This commit is contained in:
parent
f67c561d00
commit
d2d8578c1a
@ -8,7 +8,7 @@ links = AnimeLink.query.all()
|
|||||||
for link in links:
|
for link in links:
|
||||||
html = curl_content(link.link, debug=False)
|
html = curl_content(link.link, debug=False)
|
||||||
|
|
||||||
if html['http_code'] != 200:
|
if html['http_code'] != 200 and html['http_code'] != 500:
|
||||||
print('(%d) %s %s : %s' % (html['http_code'], link.title.name, link.season, link.link))
|
print('(%d) %s %s : %s' % (html['http_code'], link.title.name, link.season, link.link))
|
||||||
elif 'darkgray' in str(html['output']):
|
elif 'darkgray' in str(html['output']):
|
||||||
print('(darkgray) %s %s : %s' % (link.title.name, link.season, link.link))
|
print('(darkgray) %s %s : %s' % (link.title.name, link.season, link.link))
|
||||||
|
@ -11,9 +11,9 @@ load_dotenv()
|
|||||||
IS_DEBUG = environ.get('FLASK_ENV', 'production') == 'development'
|
IS_DEBUG = environ.get('FLASK_ENV', 'production') == 'development'
|
||||||
ADMIN_USERNAME = environ.get('ADMIN_USERNAME', 'admin')
|
ADMIN_USERNAME = environ.get('ADMIN_USERNAME', 'admin')
|
||||||
ADMIN_PASSWORD = generate_password_hash(environ.get('ADMIN_PASSWORD', 'secret'))
|
ADMIN_PASSWORD = generate_password_hash(environ.get('ADMIN_PASSWORD', 'secret'))
|
||||||
APP_PORT = environ.get('FLASK_PORT', 5000)
|
APP_PORT = int(environ.get('FLASK_PORT', 5000))
|
||||||
CACHE_TIMEOUT = environ.get('CACHE_TIMEOUT', 60 * 60)
|
CACHE_TIMEOUT = int(environ.get('CACHE_TIMEOUT', 60 * 60))
|
||||||
REQUESTS_TIMEOUT = environ.get('REQUESTS_TIMEOUT', 5)
|
REQUESTS_TIMEOUT = int(environ.get('REQUESTS_TIMEOUT', 5))
|
||||||
BLACKLIST_WORDS = environ.get('BLACKLIST_WORDS', '').split(',') if environ.get('BLACKLIST_WORDS', '') else []
|
BLACKLIST_WORDS = environ.get('BLACKLIST_WORDS', '').split(',') if environ.get('BLACKLIST_WORDS', '') else []
|
||||||
MYSQL_ENABLED = False
|
MYSQL_ENABLED = False
|
||||||
|
|
||||||
|
@ -75,6 +75,9 @@ class YggTorrent(ConnectorCore):
|
|||||||
|
|
||||||
self.on_error = False
|
self.on_error = False
|
||||||
self.is_more = valid_trs and valid_trs is not len(trs) - 1
|
self.is_more = valid_trs and valid_trs is not len(trs) - 1
|
||||||
|
elif response['http_code'] == 500:
|
||||||
|
self.on_error = False
|
||||||
|
self.is_more = True
|
||||||
|
|
||||||
|
|
||||||
class YggAnimation(YggTorrent):
|
class YggAnimation(YggTorrent):
|
||||||
|
@ -25,11 +25,11 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
{% for connector in connectors %}
|
{% for connector in connectors %}
|
||||||
{% for torrent in connector.data %}
|
{% if connector.data|length > 0 or connector.is_more %}
|
||||||
{% if not loop.index0 %}
|
<th colspan="8">{{ connector.title }}</th>
|
||||||
<th colspan="8">{{ connector.title }}</th>
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
{% for torrent in connector.data %}
|
||||||
<tr class="{{ torrent.class }}">
|
<tr class="{{ torrent.class }}">
|
||||||
<td>
|
<td>
|
||||||
{{ torrent.lang.value }}
|
{{ torrent.lang.value }}
|
||||||
|
Reference in New Issue
Block a user