Fix bug with deleted galleries

This commit is contained in:
Serene-Arc
2021-07-19 18:44:54 +10:00
parent 8826fc5aa9
commit 77aaee96f3
2 changed files with 12 additions and 1 deletions

View File

@@ -21,7 +21,7 @@ class Gallery(BaseDownloader):
def find_resources(self, authenticator: Optional[SiteAuthenticator] = None) -> list[Resource]:
try:
image_urls = self._get_links(self.post.gallery_data['items'])
except AttributeError:
except (AttributeError, TypeError):
try:
image_urls = self._get_links(self.post.crosspost_parent_list[0]['gallery_data']['items'])
except (AttributeError, IndexError, TypeError):