From c7e31b272492ba6485facef92367a85bc8ae731e Mon Sep 17 00:00:00 2001 From: johnsmith1202gmail <143646601+johnsmith1202gmail@users.noreply.github.com> Date: Wed, 30 Aug 2023 12:42:31 -0700 Subject: [PATCH] Update pixiv.py --- gallery_dl/extractor/pixiv.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gallery_dl/extractor/pixiv.py b/gallery_dl/extractor/pixiv.py index 1265a945..162f27a8 100644 --- a/gallery_dl/extractor/pixiv.py +++ b/gallery_dl/extractor/pixiv.py @@ -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: @@ -1210,10 +1215,6 @@ class PixivAppAPI(): self.extractor.wait(seconds=300) continue - if response.status_code == 403 \ - and "Artist has made their work private" in (error.get("message") or "").lower(): - raise exception.NotFoundError() - raise exception.StopExtraction("API request failed: %s", error) def _pagination(self, endpoint, params, key="illusts"):