diff --git a/docs/supportedsites.md b/docs/supportedsites.md index ddbdec9d..c7f1b60e 100644 --- a/docs/supportedsites.md +++ b/docs/supportedsites.md @@ -193,12 +193,24 @@ Consider all sites to be NSFW unless otherwise known. Chapters, Manga + + Hentai Cosplay + https://hentai-cosplays.com/ + Galleries + + Hentai Foundry https://www.hentai-foundry.com/ Favorites, individual Images, Pictures, Popular Images, Recent Images, Scraps, Stories, User Profiles + + Hentai Image + https://hentai-img.com/ + Galleries + + Hentai2Read https://hentai2read.com/ @@ -541,6 +553,12 @@ Consider all sites to be NSFW unless otherwise known. Posts, Timelines + + Porn Image + https://porn-images-xxx.com/ + Galleries + + Pornhub https://www.pornhub.com/ diff --git a/gallery_dl/extractor/__init__.py b/gallery_dl/extractor/__init__.py index 326004af..0aac7bfb 100644 --- a/gallery_dl/extractor/__init__.py +++ b/gallery_dl/extractor/__init__.py @@ -40,6 +40,7 @@ modules = [ "gfycat", "hbrowse", "hentai2read", + "hentaicosplays", "hentaifoundry", "hentaifox", "hentaihand", diff --git a/gallery_dl/extractor/hentaicosplays.py b/gallery_dl/extractor/hentaicosplays.py new file mode 100644 index 00000000..f9100879 --- /dev/null +++ b/gallery_dl/extractor/hentaicosplays.py @@ -0,0 +1,84 @@ +# -*- coding: utf-8 -*- + +# 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. + +""" +Extractor for https://hentai-cosplays.com/ +(also works for hentai-img.com and porn-images-xxx.com) +""" + +from .common import Extractor, Message +from .. import text + + +class HentaicosplaysGalleryExtractor(Extractor): + """ + Extractor for image galleries from hentai-cosplays.com, hentai-img.com, + and porn-images-xxx.com + """ + category = "hentaicosplays" + subcategory = "gallery" + directory_fmt = ("{site}", "{title}") + filename_fmt = "{filename}.{extension}" + archive_fmt = "{title}_{filename}" + root = "https://hentai-cosplays.com" + pattern = r"(?:https?://)?(?:\w{2}.)?" \ + r"(hentai-cosplays|hentai-img|porn-images-xxx)\.com/" \ + r"(?:image|story)/([\w-]+)(/\w+/\d+)?" + test = ( + ("https://hentai-cosplays.com/image/---devilism--tide-kurihara-/", { + "pattern": r"https://static\d?.hentai-cosplays.com/upload/" + r"\d+/\d+/\d+/\d+.jpg$", + "keyword": { + "count": 18, + "site": "hentai-cosplays", + "title": str, + }, + }), + ("https://fr.porn-images-xxx.com/image/enako-enako-24/", { + "pattern": r"https://static\d?.porn-images-xxx.com/upload/" + r"\d+/\d+/\d+/\d+.jpg$", + "keyword": { + "count": 11, + "site": "porn-images-xxx", + "title": str, + }, + }), + ("https://ja.hentai-img.com/image/hollow-cora-502/", { + "pattern": r"https://static\d?.hentai-img.com/upload/" + r"\d+/\d+/\d+/\d+.jpg$", + "keyword": { + "count": 2, + "site": "hentai-img", + "title": str, + }, + }), + ) + + def __init__(self, match): + Extractor.__init__(self, match) + self.site = match.group(1) + self.title = match.group(2) + + def items(self): + url = "https://{}.com/story/{}/".format( + self.site, self.title) + page = self.request(url).text + data = self.metadata(page) + images = text.extract_iter(page, + '", "")[0] + title, _, _ = title.rpartition(" Story Viewer - ") + return { + "title": title, + "site": self.site, + } diff --git a/scripts/supportedsites.py b/scripts/supportedsites.py index 11015aec..59dcca12 100755 --- a/scripts/supportedsites.py +++ b/scripts/supportedsites.py @@ -38,10 +38,12 @@ CATEGORY_MAP = { "hbrowse" : "HBrowse", "hentai2read" : "Hentai2Read", "hentaicafe" : "Hentai Cafe", + "hentaicosplays" : "Hentai Cosplay", "hentaifoundry" : "Hentai Foundry", "hentaifox" : "HentaiFox", "hentaihand" : "HentaiHand", "hentaihere" : "HentaiHere", + "hentaiimg" : "Hentai Image", "hitomi" : "Hitomi.la", "idolcomplex" : "Idol Complex", "illusioncardsbooru": "Illusion Game Cards", @@ -76,6 +78,7 @@ CATEGORY_MAP = { "nyafuu" : "Nyafuu Archive", "paheal" : "rule #34", "photovogue" : "PhotoVogue", + "pornimagesxxx" : "Porn Image", "powermanga" : "PowerManga", "readcomiconline": "Read Comic Online", "rbt" : "RebeccaBlackTech", @@ -324,6 +327,13 @@ def build_extractor_list(): default["e-hentai"] = default["exhentai"] domains["e-hentai"] = domains["exhentai"].replace("x", "-") + # add hentai-cosplays sister sites (hentai-img, porn-images-xxx) + default["hentaiimg"] = default["hentaicosplays"] + domains["hentaiimg"] = "https://hentai-img.com/" + + default["pornimagesxxx"] = default["hentaicosplays"] + domains["pornimagesxxx"] = "https://porn-images-xxx.com/" + return categories, domains