Catch additional errors in site downloaders

This commit is contained in:
Serene-Arc
2021-04-28 15:17:21 +10:00
committed by Serene
parent 6a20548269
commit 7fcbf623a0
2 changed files with 2 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ class Gfycat(GifDeliveryNetwork):
try:
out = json.loads(content.contents[0])['video']['contentUrl']
except (IndexError, KeyError) as e:
except (IndexError, KeyError, AttributeError) as e:
raise SiteDownloaderError(f'Failed to download Gfycat link {url}: {e}')
except json.JSONDecodeError as e:
raise SiteDownloaderError(f'Did not receive valid JSON data: {e}')