diff --git a/docs/supportedsites.rst b/docs/supportedsites.rst index 13fa9cc7..27067f6d 100644 --- a/docs/supportedsites.rst +++ b/docs/supportedsites.rst @@ -43,6 +43,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 HentaiHere https://hentaihere.com/ Chapters, Manga Hentainexus https://hentainexus.com/ Galleries, Search Results Hitomi.la https://hitomi.la/ Galleries diff --git a/gallery_dl/extractor/__init__.py b/gallery_dl/extractor/__init__.py index 086d0d0f..f6b33a4c 100644 --- a/gallery_dl/extractor/__init__.py +++ b/gallery_dl/extractor/__init__.py @@ -39,6 +39,7 @@ modules = [ "hentaicafe", "hentaifoundry", "hentaifox", + "hentaihand", "hentaihere", "hentainexus", "hitomi", diff --git a/gallery_dl/extractor/hentaihand.py b/gallery_dl/extractor/hentaihand.py new file mode 100644 index 00000000..302999bd --- /dev/null +++ b/gallery_dl/extractor/hentaihand.py @@ -0,0 +1,134 @@ +# -*- coding: utf-8 -*- + +# Copyright 2020 Mike Fährmann +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. + +"""Extractors for https://hentaihand.com/""" + +from .common import GalleryExtractor, Extractor, Message +from .. import text, util +import collections + + +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+)") + test = ( + ("https://hentaihand.com/comic/272772/kouda-tomohiro-chiyomi-bl", { + "pattern": r"https://i.hentaihand.com/.*/images/full/\d+.jpg$", + "count": 19, + "keyword": { + "artists" : ["kouda tomohiro"], + "categories": ["manga"], + "date" : "Feb. 6, 2020, 3:19 p.m.", + "gallery_id": 272772, + "lang" : "en", + "language" : "English", + "relationships": ["family", "step family"], + "tags" : list, + "title" : r"re:\[Kouda Tomohiro\] Chiyomi Blizzard", + "title_jp" : r"re:\[幸田朋弘\] ちよみブリザード", + }, + }), + ("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) + GalleryExtractor.__init__(self, match, url) + + def metadata(self, page): + extr = text.extract_from(page) + + title_en = text.unescape(extr("