Catch additional error in Gallery
This commit is contained in:
@@ -24,7 +24,7 @@ class Gallery(BaseDownloader):
|
|||||||
except (AttributeError, TypeError):
|
except (AttributeError, TypeError):
|
||||||
try:
|
try:
|
||||||
image_urls = self._get_links(self.post.crosspost_parent_list[0]['gallery_data']['items'])
|
image_urls = self._get_links(self.post.crosspost_parent_list[0]['gallery_data']['items'])
|
||||||
except (AttributeError, IndexError, TypeError):
|
except (AttributeError, IndexError, TypeError, KeyError):
|
||||||
logger.error(f'Could not find gallery data in submission {self.post.id}')
|
logger.error(f'Could not find gallery data in submission {self.post.id}')
|
||||||
logger.exception('Gallery image find failure')
|
logger.exception('Gallery image find failure')
|
||||||
raise SiteDownloaderError('No images found in Reddit gallery')
|
raise SiteDownloaderError('No images found in Reddit gallery')
|
||||||
|
|||||||
Reference in New Issue
Block a user