aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/scrolller.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/scrolller.py')
-rw-r--r--gallery_dl/extractor/scrolller.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/gallery_dl/extractor/scrolller.py b/gallery_dl/extractor/scrolller.py
index f97fa14..7bfc550 100644
--- a/gallery_dl/extractor/scrolller.py
+++ b/gallery_dl/extractor/scrolller.py
@@ -56,7 +56,12 @@ class ScrolllerExtractor(Extractor):
files = []
for num, media in enumerate(album, 1):
- src = max(media["mediaSources"], key=self._sort_key)
+ sources = media.get("mediaSources")
+ if not sources:
+ self.log.warning("%s/%s: Missing media file",
+ post.get("id"), num)
+ continue
+ src = max(sources, key=self._sort_key)
src["num"] = num
files.append(src)
return files