[hentaicosplays] update domains (#6578)
inherit from BaseExtractor to make differentiating between sites easier
This commit is contained in:
@@ -325,24 +325,12 @@ Consider all listed sites to potentially be NSFW.
|
|||||||
<td>Archive, Individual Posts, Home Feed, Search Results</td>
|
<td>Archive, Individual Posts, Home Feed, Search Results</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>Hentai Cosplay</td>
|
|
||||||
<td>https://hentai-cosplay-xxx.com/</td>
|
|
||||||
<td>Galleries</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Hentai Foundry</td>
|
<td>Hentai Foundry</td>
|
||||||
<td>https://www.hentai-foundry.com/</td>
|
<td>https://www.hentai-foundry.com/</td>
|
||||||
<td>Favorites, individual Images, Pictures, Popular Images, Recent Images, Scraps, Stories, Tag Searches, User Profiles</td>
|
<td>Favorites, individual Images, Pictures, Popular Images, Recent Images, Scraps, Stories, Tag Searches, User Profiles</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>Hentai Image</td>
|
|
||||||
<td>https://hentai-img.com/</td>
|
|
||||||
<td>Galleries</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Hentai2Read</td>
|
<td>Hentai2Read</td>
|
||||||
<td>https://hentai2read.com/</td>
|
<td>https://hentai2read.com/</td>
|
||||||
@@ -751,12 +739,6 @@ Consider all listed sites to potentially be NSFW.
|
|||||||
<td>Posts Images, Search Results, User Profiles</td>
|
<td>Posts Images, Search Results, User Profiles</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>Porn Image</td>
|
|
||||||
<td>https://porn-images-xxx.com/</td>
|
|
||||||
<td>Galleries</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Pornhub</td>
|
<td>Pornhub</td>
|
||||||
<td>https://www.pornhub.com/</td>
|
<td>https://www.pornhub.com/</td>
|
||||||
@@ -1268,6 +1250,28 @@ Consider all listed sites to potentially be NSFW.
|
|||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"><strong>Hentai Cosplay Instances</strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Hentai Cosplay</td>
|
||||||
|
<td>https://hentai-cosplay-xxx.com/</td>
|
||||||
|
<td>Galleries</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Hentai Image</td>
|
||||||
|
<td>https://hentai-img-xxx.com/</td>
|
||||||
|
<td>Galleries</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Porn Image</td>
|
||||||
|
<td>https://porn-image.com/</td>
|
||||||
|
<td>Galleries</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4"><strong>jschan Imageboards</strong></td>
|
<td colspan="4"><strong>jschan Imageboards</strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -5,31 +5,46 @@
|
|||||||
# published by the Free Software Foundation.
|
# published by the Free Software Foundation.
|
||||||
|
|
||||||
"""Extractors for https://hentai-cosplay-xxx.com/
|
"""Extractors for https://hentai-cosplay-xxx.com/
|
||||||
(also works for hentai-img.com and porn-images-xxx.com)"""
|
(also works for hentai-img-xxx.com and porn-image.com)"""
|
||||||
|
|
||||||
from .common import GalleryExtractor
|
from .common import BaseExtractor, GalleryExtractor
|
||||||
from .. import text
|
from .. import text
|
||||||
|
|
||||||
|
|
||||||
class HentaicosplaysGalleryExtractor(GalleryExtractor):
|
class HentaicosplaysExtractor(BaseExtractor):
|
||||||
|
basecategory = "hentaicosplays"
|
||||||
|
|
||||||
|
|
||||||
|
BASE_PATTERN = HentaicosplaysExtractor.update({
|
||||||
|
"hentaicosplay": {
|
||||||
|
"root": "https://hentai-cosplay-xxx.com",
|
||||||
|
"pattern": r"(?:\w\w\.)?hentai-cosplays?(?:-xxx)?\.com",
|
||||||
|
},
|
||||||
|
"hentaiimg": {
|
||||||
|
"root": "https://hentai-img-xxx.com",
|
||||||
|
"pattern": r"(?:\w\w\.)?hentai-img(?:-xxx)?\.com",
|
||||||
|
},
|
||||||
|
"pornimage": {
|
||||||
|
"root": "https://porn-image.com",
|
||||||
|
"pattern": r"(?:\w\w\.)?porn-images?(?:-xxx)?\.com",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
class HentaicosplaysGalleryExtractor(
|
||||||
|
HentaicosplaysExtractor, GalleryExtractor):
|
||||||
"""Extractor for image galleries from
|
"""Extractor for image galleries from
|
||||||
hentai-cosplay-xxx.com, hentai-img.com, and porn-images-xxx.com"""
|
hentai-cosplay-xxx.com, hentai-img-xxx.com, and porn-image.com"""
|
||||||
category = "hentaicosplays"
|
|
||||||
directory_fmt = ("{site}", "{title}")
|
directory_fmt = ("{site}", "{title}")
|
||||||
filename_fmt = "{filename}.{extension}"
|
filename_fmt = "{filename}.{extension}"
|
||||||
archive_fmt = "{title}_{filename}"
|
archive_fmt = "{title}_{filename}"
|
||||||
pattern = r"((?:https?://)?(?:\w{2}\.)?" \
|
pattern = BASE_PATTERN + r"/(?:image|story)/([\w-]+)"
|
||||||
r"(hentai-cosplay(?:s|-xxx)|hentai-img|porn-images-xxx)\.com)/" \
|
|
||||||
r"(?:image|story)/([\w-]+)"
|
|
||||||
example = "https://hentai-cosplay-xxx.com/image/TITLE/"
|
example = "https://hentai-cosplay-xxx.com/image/TITLE/"
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
root, self.site, self.slug = match.groups()
|
BaseExtractor.__init__(self, match)
|
||||||
self.root = text.ensure_http_scheme(root)
|
self.slug = self.groups[-1]
|
||||||
if self.root == "https://hentai-cosplays.com":
|
self.gallery_url = "{}/story/{}/".format(self.root, self.slug)
|
||||||
self.root = "https://hentai-cosplay-xxx.com"
|
|
||||||
url = "{}/story/{}/".format(self.root, self.slug)
|
|
||||||
GalleryExtractor.__init__(self, match, url)
|
|
||||||
|
|
||||||
def _init(self):
|
def _init(self):
|
||||||
self.session.headers["Referer"] = self.gallery_url
|
self.session.headers["Referer"] = self.gallery_url
|
||||||
@@ -39,7 +54,7 @@ class HentaicosplaysGalleryExtractor(GalleryExtractor):
|
|||||||
return {
|
return {
|
||||||
"title": text.unescape(title.rpartition(" Story Viewer - ")[0]),
|
"title": text.unescape(title.rpartition(" Story Viewer - ")[0]),
|
||||||
"slug" : self.slug,
|
"slug" : self.slug,
|
||||||
"site" : self.site,
|
"site" : self.root.partition("://")[2].rpartition(".")[0],
|
||||||
}
|
}
|
||||||
|
|
||||||
def images(self, page):
|
def images(self, page):
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ CATEGORY_MAP = {
|
|||||||
"hatenablog" : "HatenaBlog",
|
"hatenablog" : "HatenaBlog",
|
||||||
"hbrowse" : "HBrowse",
|
"hbrowse" : "HBrowse",
|
||||||
"hentai2read" : "Hentai2Read",
|
"hentai2read" : "Hentai2Read",
|
||||||
"hentaicosplays" : "Hentai Cosplay",
|
"hentaicosplay" : "Hentai Cosplay",
|
||||||
"hentaifoundry" : "Hentai Foundry",
|
"hentaifoundry" : "Hentai Foundry",
|
||||||
"hentaifox" : "HentaiFox",
|
"hentaifox" : "HentaiFox",
|
||||||
"hentaihand" : "HentaiHand",
|
"hentaihand" : "HentaiHand",
|
||||||
@@ -112,7 +112,7 @@ CATEGORY_MAP = {
|
|||||||
"photovogue" : "PhotoVogue",
|
"photovogue" : "PhotoVogue",
|
||||||
"pidgiwiki" : "PidgiWiki",
|
"pidgiwiki" : "PidgiWiki",
|
||||||
"pixeldrain" : "pixeldrain",
|
"pixeldrain" : "pixeldrain",
|
||||||
"pornimagesxxx" : "Porn Image",
|
"pornimage" : "Porn Image",
|
||||||
"pornpics" : "PornPics.com",
|
"pornpics" : "PornPics.com",
|
||||||
"pornreactor" : "PornReactor",
|
"pornreactor" : "PornReactor",
|
||||||
"readcomiconline": "Read Comic Online",
|
"readcomiconline": "Read Comic Online",
|
||||||
@@ -366,6 +366,7 @@ BASE_MAP = {
|
|||||||
"foolslide" : "FoOlSlide Instances",
|
"foolslide" : "FoOlSlide Instances",
|
||||||
"gelbooru_v01": "Gelbooru Beta 0.1.11",
|
"gelbooru_v01": "Gelbooru Beta 0.1.11",
|
||||||
"gelbooru_v02": "Gelbooru Beta 0.2",
|
"gelbooru_v02": "Gelbooru Beta 0.2",
|
||||||
|
"hentaicosplays": "Hentai Cosplay Instances",
|
||||||
"jschan" : "jschan Imageboards",
|
"jschan" : "jschan Imageboards",
|
||||||
"lolisafe" : "lolisafe and chibisafe",
|
"lolisafe" : "lolisafe and chibisafe",
|
||||||
"lynxchan" : "LynxChan Imageboards",
|
"lynxchan" : "LynxChan Imageboards",
|
||||||
@@ -561,13 +562,6 @@ def build_extractor_list():
|
|||||||
default["coomerparty"] = default["kemonoparty"]
|
default["coomerparty"] = default["kemonoparty"]
|
||||||
domains["coomerparty"] = domains["kemonoparty"].replace("kemono", "coomer")
|
domains["coomerparty"] = domains["kemonoparty"].replace("kemono", "coomer")
|
||||||
|
|
||||||
# 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/"
|
|
||||||
|
|
||||||
# add manga4life.com
|
# add manga4life.com
|
||||||
default["mangalife"] = default["mangasee"]
|
default["mangalife"] = default["mangasee"]
|
||||||
domains["mangalife"] = "https://manga4life.com/"
|
domains["mangalife"] = "https://manga4life.com/"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from gallery_dl.extractor import hentaicosplays
|
|||||||
__tests__ = (
|
__tests__ = (
|
||||||
{
|
{
|
||||||
"#url" : "https://hentai-cosplay-xxx.com/image/---devilism--tide-kurihara-/",
|
"#url" : "https://hentai-cosplay-xxx.com/image/---devilism--tide-kurihara-/",
|
||||||
"#category": ("", "hentaicosplays", "gallery"),
|
"#category": ("hentaicosplays", "hentaicosplay", "gallery"),
|
||||||
"#class" : hentaicosplays.HentaicosplaysGalleryExtractor,
|
"#class" : hentaicosplays.HentaicosplaysGalleryExtractor,
|
||||||
"#pattern" : r"https://static\d?\.hentai-cosplay-xxx\.com/upload/\d+/\d+/\d+/\d+\.jpg$",
|
"#pattern" : r"https://static\d?\.hentai-cosplay-xxx\.com/upload/\d+/\d+/\d+/\d+\.jpg$",
|
||||||
|
|
||||||
@@ -22,36 +22,48 @@ __tests__ = (
|
|||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://hentai-cosplays.com/image/---devilism--tide-kurihara-/",
|
"#url" : "https://hentai-cosplays.com/image/---devilism--tide-kurihara-/",
|
||||||
"#category": ("", "hentaicosplays", "gallery"),
|
"#category": ("hentaicosplays", "hentaicosplay", "gallery"),
|
||||||
"#class" : hentaicosplays.HentaicosplaysGalleryExtractor,
|
"#class" : hentaicosplays.HentaicosplaysGalleryExtractor,
|
||||||
"#pattern" : r"https://static\d?\.hentai-cosplay-xxx\.com/upload/\d+/\d+/\d+/\d+\.jpg$",
|
"#pattern" : r"https://static\d?\.hentai-cosplay-xxx\.com/upload/\d+/\d+/\d+/\d+\.jpg$",
|
||||||
|
|
||||||
"count": 18,
|
"count": 18,
|
||||||
"site" : "hentai-cosplays",
|
"site" : "hentai-cosplay-xxx",
|
||||||
"slug" : "---devilism--tide-kurihara-",
|
"slug" : "---devilism--tide-kurihara-",
|
||||||
"title": "艦 こ れ-devilism の tide Kurihara 憂",
|
"title": "艦 こ れ-devilism の tide Kurihara 憂",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://fr.porn-images-xxx.com/image/enako-enako-24/",
|
"#url" : "https://fr.porn-image.com/image/enako-enako-24/",
|
||||||
"#category": ("", "hentaicosplays", "gallery"),
|
"#category": ("hentaicosplays", "pornimage", "gallery"),
|
||||||
"#class" : hentaicosplays.HentaicosplaysGalleryExtractor,
|
"#class" : hentaicosplays.HentaicosplaysGalleryExtractor,
|
||||||
"#pattern" : r"https://static\d?.porn-images-xxx.com/upload/\d+/\d+/\d+/\d+.jpg$",
|
"#pattern" : r"https://static\d?.porn-image.com/upload/\d+/\d+/\d+/\d+.jpg$",
|
||||||
|
|
||||||
"count": 11,
|
"count": 11,
|
||||||
"site" : "porn-images-xxx",
|
"site" : "porn-image",
|
||||||
|
"title": str,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://fr.porn-images-xxx.com/image/enako-enako-24/",
|
||||||
|
"#category": ("hentaicosplays", "pornimage", "gallery"),
|
||||||
|
"#class" : hentaicosplays.HentaicosplaysGalleryExtractor,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://ja.hentai-img-xxx.com/image/hollow-cora-502/",
|
||||||
|
"#category": ("hentaicosplays", "hentaiimg", "gallery"),
|
||||||
|
"#class" : hentaicosplays.HentaicosplaysGalleryExtractor,
|
||||||
|
"#pattern" : r"https://static\d?.hentai-img-xxx.com/upload/\d+/\d+/\d+/\d+.jpg$",
|
||||||
|
|
||||||
|
"count": 2,
|
||||||
|
"site" : "hentai-img-xxx",
|
||||||
"title": str,
|
"title": str,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://ja.hentai-img.com/image/hollow-cora-502/",
|
"#url" : "https://ja.hentai-img.com/image/hollow-cora-502/",
|
||||||
"#category": ("", "hentaicosplays", "gallery"),
|
"#category": ("hentaicosplays", "hentaiimg", "gallery"),
|
||||||
"#class" : hentaicosplays.HentaicosplaysGalleryExtractor,
|
"#class" : hentaicosplays.HentaicosplaysGalleryExtractor,
|
||||||
"#pattern" : r"https://static\d?.hentai-img.com/upload/\d+/\d+/\d+/\d+.jpg$",
|
|
||||||
|
|
||||||
"count": 2,
|
|
||||||
"site" : "hentai-img",
|
|
||||||
"title": str,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user