diff options
| author | 2022-12-04 23:25:11 -0500 | |
|---|---|---|
| committer | 2022-12-04 23:25:11 -0500 | |
| commit | b79007bb57b43b0bb5eff4aa8e5e77a782896e10 (patch) | |
| tree | 42a4b6168cc46f818465a3c25788253b2aa1b1a5 /gallery_dl/extractor/hitomi.py | |
| parent | 9f3eb7898190a9f1e131a523f37e2e53cc6c6d68 (diff) | |
| parent | 3338dfce719c999467ffe08fd45663be8190057a (diff) | |
Update upstream source from tag 'upstream/1.24.1'
Update to upstream version '1.24.1'
with Debian dir 327715c78291415f1ede99ba69c817d2264b3693
Diffstat (limited to 'gallery_dl/extractor/hitomi.py')
| -rw-r--r-- | gallery_dl/extractor/hitomi.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gallery_dl/extractor/hitomi.py b/gallery_dl/extractor/hitomi.py index cc110aa..44459ce 100644 --- a/gallery_dl/extractor/hitomi.py +++ b/gallery_dl/extractor/hitomi.py @@ -115,16 +115,17 @@ class HitomiGalleryExtractor(GalleryExtractor): fmt = self.config("format") or "webp" if fmt == "original": - subdomain, fmt, ext, check = "b", "images", None, False + subdomain, path, ext, check = "b", "images", None, False else: - subdomain, ext, check = "a", fmt, True + subdomain, path, ext, check = "a", fmt, fmt, (fmt != "webp") result = [] for image in self.info["files"]: if check: - if not image.get("has" + fmt): - fmt = ext = "webp" - check = False + if image.get("has" + fmt): + path = ext = fmt + else: + path = ext = "webp" ihash = image["hash"] idata = text.nameext_from_url(image["name"]) if ext: @@ -134,7 +135,7 @@ class HitomiGalleryExtractor(GalleryExtractor): inum = int(ihash[-1] + ihash[-3:-1], 16) url = "https://{}{}.hitomi.la/{}/{}/{}/{}.{}".format( chr(97 + gg_m.get(inum, gg_default)), - subdomain, fmt, gg_b, inum, ihash, idata["extension"], + subdomain, path, gg_b, inum, ihash, idata["extension"], ) result.append((url, idata)) return result |
