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/pynyaata/get404.py
Michel Roux 0bae69ef2f
All checks were successful
continuous-integration/drone/push Build is passing
Change arch to be able to deploy to pypi
2020-04-09 20:47:56 +02:00

15 lines
496 B
Python

from pynyaata.config import app
from pynyaata.connectors import curl_content
from pynyaata.models import AnimeLink
app.config['SQLALCHEMY_ECHO'] = False
links = AnimeLink.query.all()
for link in links:
html = curl_content(link.link)
if html['http_code'] != 200:
print('(%d) %s %s : %s' % (html['http_code'], link.title.name, link.season, link.link))
elif 'darkgray' in str(html['output']):
print('(darkgray) %s %s : %s' % (link.title.name, link.season, link.link))