diff --git a/docs/configuration.rst b/docs/configuration.rst index 403d2ca0..a76ce458 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -1568,6 +1568,20 @@ Description to already favorited galleries. +extractor.exhentai.gp +--------------------- +Type + ``string`` +Example + ``"resized"`` +Description + Selects how to handle "you do not have enough GP" errors. + + * `"resized"`: Continue downloading `non-original `__ images. + * `"stop"`: Stop the current extractor run. + * `"wait"`: Wait for user input before retrying the current image. + + extractor.exhentai.limits ------------------------- Type diff --git a/gallery_dl/extractor/exhentai.py b/gallery_dl/extractor/exhentai.py index 5f9ccb21..5dc498f1 100644 --- a/gallery_dl/extractor/exhentai.py +++ b/gallery_dl/extractor/exhentai.py @@ -175,6 +175,13 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor): self.log.warning("'%s'", page) if " requires GP" in page: + gp = self.config("gp") + if gp == "stop": + raise exception.StopExtraction("Not enough GP") + elif gp == "wait": + input("Press ENTER to continue.") + return response.url + self.log.info("Falling back to non-original downloads") self.original = False return data["_url_1280"]