diff options
Diffstat (limited to 'gallery_dl/extractor/hitomi.py')
| -rw-r--r-- | gallery_dl/extractor/hitomi.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gallery_dl/extractor/hitomi.py b/gallery_dl/extractor/hitomi.py index da53113..209a4f2 100644 --- a/gallery_dl/extractor/hitomi.py +++ b/gallery_dl/extractor/hitomi.py @@ -111,9 +111,9 @@ class HitomiGalleryExtractor(GalleryExtractor): response = self.request(url, fatal=False) if b"<title>Redirect</title>" not in response.content: break - url = text.extract(response.text, "href='", "'")[0] - if not url.startswith("http"): - url = text.urljoin(self.root, url) + url = text.extract( + response.text, 'http-equiv="refresh" content="', '"', + )[0].partition("=")[2] if response.status_code >= 400: return {} @@ -158,9 +158,9 @@ class HitomiTagExtractor(Extractor): subcategory = "tag" pattern = (r"(?:https?://)?hitomi\.la/" r"(tag|artist|group|series|type|character)/" - r"([^/?&#]+)-\d+\.html") + r"([^/?&#]+)\.html") test = ( - ("https://hitomi.la/tag/screenshots-japanese-1.html", { + ("https://hitomi.la/tag/screenshots-japanese.html", { "pattern": HitomiGalleryExtractor.pattern, "count": ">= 35", }), @@ -175,6 +175,10 @@ class HitomiTagExtractor(Extractor): Extractor.__init__(self, match) self.type, self.tag = match.groups() + tag, _, num = self.tag.rpartition("-") + if num.isdecimal(): + self.tag = tag + def items(self): url = "https://ltn.hitomi.la/{}/{}.nozomi".format(self.type, self.tag) data = {"_extractor": HitomiGalleryExtractor} |
