1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2025-01-31 11:41:35 +01:00

[danbooru] handle posts without 'id' (fixes #1004)

This commit is contained in:
Mike Fährmann 2020-09-16 21:14:11 +02:00
parent cc1fb0b4ea
commit 2626629117
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -93,7 +93,12 @@ class DanbooruExtractor(SharedConfigMixin, Extractor):
if pagenum:
params["page"] += 1
else:
params["page"] = "b{}".format(posts[-1]["id"])
for post in reversed(posts):
if "id" in post:
params["page"] = "b{}".format(post["id"])
break
else:
return
class DanbooruTagExtractor(DanbooruExtractor):