[hitomi] update URL pattern for tag searches
This commit is contained in:
@@ -158,9 +158,9 @@ class HitomiTagExtractor(Extractor):
|
|||||||
subcategory = "tag"
|
subcategory = "tag"
|
||||||
pattern = (r"(?:https?://)?hitomi\.la/"
|
pattern = (r"(?:https?://)?hitomi\.la/"
|
||||||
r"(tag|artist|group|series|type|character)/"
|
r"(tag|artist|group|series|type|character)/"
|
||||||
r"([^/?&#]+)-\d+\.html")
|
r"([^/?&#]+)\.html")
|
||||||
test = (
|
test = (
|
||||||
("https://hitomi.la/tag/screenshots-japanese-1.html", {
|
("https://hitomi.la/tag/screenshots-japanese.html", {
|
||||||
"pattern": HitomiGalleryExtractor.pattern,
|
"pattern": HitomiGalleryExtractor.pattern,
|
||||||
"count": ">= 35",
|
"count": ">= 35",
|
||||||
}),
|
}),
|
||||||
@@ -175,6 +175,10 @@ class HitomiTagExtractor(Extractor):
|
|||||||
Extractor.__init__(self, match)
|
Extractor.__init__(self, match)
|
||||||
self.type, self.tag = match.groups()
|
self.type, self.tag = match.groups()
|
||||||
|
|
||||||
|
tag, _, num = self.tag.rpartition("-")
|
||||||
|
if num.isdecimal():
|
||||||
|
self.tag = tag
|
||||||
|
|
||||||
def items(self):
|
def items(self):
|
||||||
url = "https://ltn.hitomi.la/{}/{}.nozomi".format(self.type, self.tag)
|
url = "https://ltn.hitomi.la/{}/{}.nozomi".format(self.type, self.tag)
|
||||||
data = {"_extractor": HitomiGalleryExtractor}
|
data = {"_extractor": HitomiGalleryExtractor}
|
||||||
|
|||||||
Reference in New Issue
Block a user