Catch additional error in galleries

This commit is contained in:
Serene-Arc 2021-07-02 15:11:09 +10:00
parent aa55a92791
commit d5ef991b3a

View File

@ -24,7 +24,7 @@ class Gallery(BaseDownloader):
except AttributeError:
try:
image_urls = self._get_links(self.post.crosspost_parent_list[0]['gallery_data']['items'])
except (AttributeError, IndexError):
except (AttributeError, IndexError, TypeError):
logger.error(f'Could not find gallery data in submission {self.post.id}')
logger.exception('Gallery image find failure')
raise SiteDownloaderError('No images found in Reddit gallery')