[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

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):