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

15 lines
543 B
Python
Raw Normal View History

from pynyaata.config import app
2020-04-24 19:01:44 +00:00
from pynyaata.connectors.core import curl_content
from pynyaata.models import AnimeLink
2019-12-11 18:40:35 +00:00
app.config['SQLALCHEMY_ECHO'] = False
links = AnimeLink.query.all()
for link in links:
2020-07-25 14:27:21 +00:00
html = curl_content(link.link, debug=False)
2019-12-11 18:40:35 +00:00
2020-10-19 21:15:58 +00:00
if html['http_code'] != 200 and html['http_code'] != 500:
2019-12-11 18:40:35 +00:00
print('(%d) %s %s : %s' % (html['http_code'], link.title.name, link.season, link.link))
2020-03-20 13:13:15 +00:00
elif 'darkgray' in str(html['output']):
2020-03-20 13:07:04 +00:00
print('(darkgray) %s %s : %s' % (link.title.name, link.season, link.link))