diff --git a/docs/supportedsites.rst b/docs/supportedsites.rst index a970c03c..146eade8 100644 --- a/docs/supportedsites.rst +++ b/docs/supportedsites.rst @@ -44,7 +44,7 @@ Hentai Cafe https://hentai.cafe/ Chapters, Manga Hentai Foundry https://www.hentai-foundry.com/ |hentaifoundry-C| Hentai2Read https://hentai2read.com/ Chapters, Manga HentaiFox https://hentaifox.com/ Galleries, Search Results -HentaiHand https://hentaihand.com/ Galleries, Search Results, Tag Searches +HentaiHand https://hentaihand.com/ Galleries, Tag Searches HentaiHere https://hentaihere.com/ Chapters, Manga Hentainexus https://hentainexus.com/ Galleries, Search Results Hiperdex https://hiperdex.com/ Artists, Chapters, Manga diff --git a/gallery_dl/extractor/hentaihand.py b/gallery_dl/extractor/hentaihand.py index 302999bd..7635bf1c 100644 --- a/gallery_dl/extractor/hentaihand.py +++ b/gallery_dl/extractor/hentaihand.py @@ -10,74 +10,61 @@ from .common import GalleryExtractor, Extractor, Message from .. import text, util -import collections +import json class HentaihandGalleryExtractor(GalleryExtractor): """Extractor for image galleries on hentaihand.com""" category = "hentaihand" root = "https://hentaihand.com" - pattern = (r"(?i)(?:https?://)?(?:www\.)?hentaihand\.com" - r"/(?:comi|view)c/(\d+)") + pattern = r"(?:https?://)?(?:www\.)?hentaihand\.com/\w+/comic/([\w-]+)" test = ( - ("https://hentaihand.com/comic/272772/kouda-tomohiro-chiyomi-bl", { - "pattern": r"https://i.hentaihand.com/.*/images/full/\d+.jpg$", + (("https://hentaihand.com/en/comic/kouda-tomohiro-chiyomi-" + "blizzard-comic-aun-2016-12-english-nanda-sore-scans"), { + "pattern": r"https://cdn.hentaihand.com/.*/images/304546/\d+.jpg$", "count": 19, "keyword": { - "artists" : ["kouda tomohiro"], - "categories": ["manga"], - "date" : "Feb. 6, 2020, 3:19 p.m.", - "gallery_id": 272772, + "artists" : ["Kouda Tomohiro"], + "date" : "dt:2020-02-06 00:00:00", + "gallery_id": 304546, "lang" : "en", "language" : "English", - "relationships": ["family", "step family"], + "relationships": ["Family", "Step family"], "tags" : list, "title" : r"re:\[Kouda Tomohiro\] Chiyomi Blizzard", - "title_jp" : r"re:\[幸田朋弘\] ちよみブリザード", + "title_alt" : r"re:\[幸田朋弘\] ちよみブリザード", + "type" : "Manga", }, }), - ("https://hentaihand.com/viewc/272772/kouda-tomohiro-chiyomi-bl"), ) def __init__(self, match): - self.gallery_id = match.group(1) - url = "{}/comic/{}".format(self.root, self.gallery_id) + self.slug = match.group(1) + url = "{}/api/comics/{}".format(self.root, self.slug) GalleryExtractor.__init__(self, match, url) def metadata(self, page): - extr = text.extract_from(page) - - title_en = text.unescape(extr("