[exhentai] add 'gp' option (#4576)

pull/4850/head
Mike Fährmann 10 months ago
parent cb9a1176e6
commit b43be67206
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -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 <extractor.exhentai.original_>`__ images.
* `"stop"`: Stop the current extractor run.
* `"wait"`: Wait for user input before retrying the current image.
extractor.exhentai.limits
-------------------------
Type

@ -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"]

Loading…
Cancel
Save