merge #4481: [pixiv] handle errors for private novels
This commit is contained in:
@@ -863,9 +863,14 @@ class PixivNovelExtractor(PixivExtractor):
|
|||||||
novel["suffix"] = ""
|
novel["suffix"] = ""
|
||||||
|
|
||||||
yield Message.Directory, novel
|
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"
|
novel["extension"] = "txt"
|
||||||
content = self.api.novel_text(novel["id"])["novel_text"]
|
|
||||||
yield Message.Url, "text:" + content, novel
|
yield Message.Url, "text:" + content, novel
|
||||||
|
|
||||||
if embeds:
|
if embeds:
|
||||||
|
|||||||
Reference in New Issue
Block a user