[exhentai] fix TypeError for infinite 'fallback-retries' (#4911)

pull/4945/head
Mike Fährmann 9 months ago
parent a24b82e67d
commit 2d5cda2b92
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -138,9 +138,6 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor):
self.limits = False
self.fallback_retries = self.config("fallback-retries", 2)
if self.fallback_retries < 0:
self.fallback_retries = float("inf")
self.original = self.config("original", True)
def favorite(self, slot="0"):
@ -449,14 +446,14 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor):
def _fallback_original(self, nl, fullimg):
url = "{}?nl={}".format(fullimg, nl)
for _ in range(self.fallback_retries):
for _ in util.repeat(self.fallback_retries):
yield url
def _fallback_1280(self, nl, num, token=None):
if not token:
token = self.key_start
for _ in range(self.fallback_retries):
for _ in util.repeat(self.fallback_retries):
url = "{}/s/{}/{}-{}?nl={}".format(
self.root, token, self.gallery_id, num, nl)

Loading…
Cancel
Save