[hitomi] add extractor for tag searches (closes #697)
This commit is contained in:
@@ -49,7 +49,7 @@ HentaiHand https://hentaihand.com/ Galleries, Search Resul
|
|||||||
HentaiHere https://hentaihere.com/ Chapters, Manga
|
HentaiHere https://hentaihere.com/ Chapters, Manga
|
||||||
Hentainexus https://hentainexus.com/ Galleries, Search Results
|
Hentainexus https://hentainexus.com/ Galleries, Search Results
|
||||||
Hiperdex https://hiperdex.net/ Artists, Chapters, Manga
|
Hiperdex https://hiperdex.net/ Artists, Chapters, Manga
|
||||||
Hitomi.la https://hitomi.la/ Galleries
|
Hitomi.la https://hitomi.la/ Galleries, Tag Searches
|
||||||
Hypnohub https://hypnohub.net/ Pools, Popular Images, Posts, Tag Searches
|
Hypnohub https://hypnohub.net/ Pools, Popular Images, Posts, Tag Searches
|
||||||
Idol Complex https://idol.sankakucomplex.com/ Pools, Posts, Tag Searches Optional
|
Idol Complex https://idol.sankakucomplex.com/ Pools, Posts, Tag Searches Optional
|
||||||
ImageBam http://www.imagebam.com/ Galleries, individual Images
|
ImageBam http://www.imagebam.com/ Galleries, individual Images
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
"""Extractors for https://hitomi.la/"""
|
"""Extractors for https://hitomi.la/"""
|
||||||
|
|
||||||
from .common import GalleryExtractor
|
from .common import GalleryExtractor, Extractor, Message
|
||||||
|
from .nozomi import decode_nozomi
|
||||||
from .. import text, util
|
from .. import text, util
|
||||||
import string
|
import string
|
||||||
import json
|
import json
|
||||||
@@ -149,3 +150,35 @@ class HitomiGalleryExtractor(GalleryExtractor):
|
|||||||
)
|
)
|
||||||
result.append((url, idata))
|
result.append((url, idata))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
class HitomiTagExtractor(Extractor):
|
||||||
|
"""Extractor for galleries from tag searches on hitomi.la"""
|
||||||
|
category = "hitomi"
|
||||||
|
subcategory = "tag"
|
||||||
|
pattern = (r"(?:https?://)?hitomi\.la/"
|
||||||
|
r"(tag|artist|group|series|type|character)/"
|
||||||
|
r"([^/?&#]+)-\d+\.html")
|
||||||
|
test = (
|
||||||
|
("https://hitomi.la/tag/screenshots-japanese-1.html", {
|
||||||
|
"pattern": HitomiGalleryExtractor.pattern,
|
||||||
|
"count": ">= 35",
|
||||||
|
}),
|
||||||
|
("https://hitomi.la/artist/a1-all-1.html"),
|
||||||
|
("https://hitomi.la/group/initial%2Dg-all-1.html"),
|
||||||
|
("https://hitomi.la/series/amnesia-all-1.html"),
|
||||||
|
("https://hitomi.la/type/doujinshi-all-1.html"),
|
||||||
|
("https://hitomi.la/character/a2-all-1.html"),
|
||||||
|
)
|
||||||
|
|
||||||
|
def __init__(self, match):
|
||||||
|
Extractor.__init__(self, match)
|
||||||
|
self.type, self.tag = match.groups()
|
||||||
|
|
||||||
|
def items(self):
|
||||||
|
url = "https://ltn.hitomi.la/{}/{}.nozomi".format(self.type, self.tag)
|
||||||
|
data = {"_extractor": HitomiGalleryExtractor}
|
||||||
|
|
||||||
|
for gallery_id in decode_nozomi(self.request(url).content):
|
||||||
|
url = "https://hitomi.la/galleries/{}.html".format(gallery_id)
|
||||||
|
yield Message.Queue, url, data
|
||||||
|
|||||||
Reference in New Issue
Block a user