Add get404 cron
This commit is contained in:
parent
d110c75f49
commit
cad684e209
13
get404.py
Normal file
13
get404.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
from config import app
|
||||||
|
from connectors import Connector
|
||||||
|
from models import AnimeLink
|
||||||
|
|
||||||
|
app.config['SQLALCHEMY_ECHO'] = False
|
||||||
|
links = AnimeLink.query.all()
|
||||||
|
|
||||||
|
for link in links:
|
||||||
|
connect = Connector.get_instance(link.link, link.title.keyword)
|
||||||
|
html = connect.curl_content(link.link)
|
||||||
|
|
||||||
|
if html['http_code'] is not 200:
|
||||||
|
print('(%d) %s %s : %s' % (html['http_code'], link.title.name, link.season, link.link))
|
Reference in New Issue
Block a user