Skip to content

Commit

Permalink
merge #4481: [pixiv] handle errors for private novels
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Sep 2, 2023
2 parents 3cb4cee + c7e31b2 commit 03d471a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gallery_dl/extractor/pixiv.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,9 +863,14 @@ def transform_tags(work):
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:
Expand Down

0 comments on commit 03d471a

Please sign in to comment.