aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/scrolller.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2025-05-05 01:19:04 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2025-05-05 01:19:04 -0400
commit2486bca7db446271312f1fc0f46b032154c65f1b (patch)
tree86deb50b258b2dab02936802b79d1af7e3c254ab /gallery_dl/extractor/scrolller.py
parentf98d637baa18530edb64e5f71bb9feefbd9e80b4 (diff)
parentc679cd7a13bdbf6896e53d68fe2093910bc6625a (diff)
Update upstream source from tag 'upstream/1.29.6'
Update to upstream version '1.29.6' with Debian dir fb955c7c635591b07c8b52773c233ca312089e7a
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