merge #4481: [pixiv] handle errors for private novels

This commit is contained in:
Mike Fährmann
2023-09-02 12:50:23 +02:00

View File

@@ -863,9 +863,14 @@ class PixivNovelExtractor(PixivExtractor):
novel["suffix"] = ""
yield Message.Directory, novel
try:
content = self.api.novel_text(novel["id"])["novel_text"]
except Exception:
self.log.warning("Unable to download novel %s", novel["id"])
continue
novel["extension"] = "txt"
content = self.api.novel_text(novel["id"])["novel_text"]
yield Message.Url, "text:" + content, novel
if embeds: