This repository has been archived on 2023-10-01. You can view files and clone it, but cannot push or open issues or pull requests.
PyNyaaTa/get404.py

16 lines
542 B
Python
Raw Normal View History

2019-12-11 18:40:35 +00:00
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))
2020-03-20 13:12:14 +00:00
elif b'darkgray' in html['output']:
2020-03-20 13:07:04 +00:00
print('(darkgray) %s %s : %s' % (link.title.name, link.season, link.link))