1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-24 22:27:28 +00:00

Fix SauceNAO returning server errors for some images

This commit is contained in:
Myned 2019-11-01 19:18:25 -04:00
parent 3b26966e0a
commit d0c72bc290
No known key found for this signature in database
GPG key ID: BC58C09870A63E59

View file

@ -83,7 +83,9 @@ async def query_saucenao(url):
params={'url': url, 'api_key': u.config['saucenao_api'], 'output_type': 2}, params={'url': url, 'api_key': u.config['saucenao_api'], 'output_type': 2},
json=True) json=True)
if content['header'].get('message', '') == 'Access to specified file was denied... ;_;': if content['header'].get('message', '') in (
'Access to specified file was denied... ;_;',
'Problem with remote server...'):
raise exc.ImageError raise exc.ImageError
match = content['results'][0] match = content['results'][0]