-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
6 changed files
with
179 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Copyright 2025 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://hentaiera.com/""" | ||
|
||
from . import imhentai | ||
|
||
BASE_PATTERN = r"(?:https?://)?(?:www\.)?hentaiera\.com" | ||
|
||
|
||
class HentaieraExtractor(): | ||
category = "hentaiera" | ||
root = "https://hentaiera.com" | ||
|
||
|
||
class HentaieraGalleryExtractor( | ||
HentaieraExtractor, imhentai.ImhentaiGalleryExtractor): | ||
"""Extractor for hentaiera galleries""" | ||
pattern = BASE_PATTERN + r"/(?:gallery|view)/(\d+)" | ||
example = "https://hentaiera.com/gallery/12345/" | ||
|
||
|
||
class HentaieraTagExtractor( | ||
HentaieraExtractor, imhentai.ImhentaiTagExtractor): | ||
"""Extractor for hentaiera tag searches""" | ||
subcategory = "tag" | ||
pattern = (BASE_PATTERN + r"(/(?:" | ||
r"artist|category|character|group|language|parody|tag" | ||
r")/([^/?#]+))") | ||
example = "https://hentaiera.com/tag/TAG/" | ||
|
||
|
||
class HentaieraSearchExtractor( | ||
HentaieraExtractor, imhentai.ImhentaiSearchExtractor): | ||
"""Extractor for hentaiera search results""" | ||
subcategory = "search" | ||
pattern = BASE_PATTERN + r"/search/?\?([^#]+)" | ||
example = "https://hentaiera.com/search/?key=QUERY" | ||
|
||
|
||
HentaieraExtractor._gallery_extractor = HentaieraGalleryExtractor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# -*- 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. | ||
|
||
from gallery_dl.extractor import hentaiera | ||
|
||
|
||
__tests__ = ( | ||
{ | ||
"#url" : "https://hentaiera.com/gallery/28/", | ||
"#class" : hentaiera.HentaieraGalleryExtractor, | ||
"#pattern": r"https://m1\.hentaiera\.com/001/knrxtga49v/\d+\.jpg", | ||
"#count" : 25, | ||
|
||
"count" : 25, | ||
"extension" : "jpg", | ||
"filename" : r"re:\d+", | ||
"gallery_id": 28, | ||
"lang" : "ja", | ||
"num" : range(1, 25), | ||
"title" : "(Shikei wa Iyadakara na) [Kujira Logic, TOYBOX (Kujiran, Kurikara)] Gensou-kyou Chichi Zukan - Kurenai (Touhou Project)", | ||
"title_alt" : "(死刑はいやだからな) [くぢらろじっく, といぼっくす (くぢらん, くりから)] 幻想郷乳図鑑 - 紅 (東方Project)", | ||
"type" : "doujinshi", | ||
"width" : {696, 701}, | ||
"height" : {999, 1000}, | ||
|
||
"artist": [ | ||
"kujiran", | ||
"kurikara", | ||
], | ||
"character": [ | ||
"hong meiling", | ||
"koakuma", | ||
"patchouli knowledge", | ||
"remilia scarlet", | ||
"sakuya izayoi", | ||
], | ||
"group": [ | ||
"kujira logic", | ||
"toybox", | ||
], | ||
"language": [ | ||
"japanese", | ||
], | ||
"parody": [ | ||
"touhou project", | ||
], | ||
"tags": [ | ||
"big breasts", | ||
"footjob", | ||
"futanari", | ||
"lolicon", | ||
"maid", | ||
"paizuri", | ||
], | ||
}, | ||
|
||
{ | ||
"#url" : "https://hentaiera.com/gallery/9319/", | ||
"#class" : hentaiera.HentaieraGalleryExtractor, | ||
"#pattern": r"https://m1\.hentaiera\.com/001/gkchsf3x5m/\d+\.jpg", | ||
"#count" : 8, | ||
|
||
"count" : 8, | ||
"extension" : "jpg", | ||
"filename" : r"re:\d+", | ||
"gallery_id": 9319, | ||
"lang" : "ja", | ||
"num" : range(1, 8), | ||
"title" : "(C70) [UDON-YA (Kizuki Aruchu, ZAN)] Udonko CM70 Omake Hon (Various)", | ||
"title_alt" : "(C70) [うどんや (鬼月あるちゅ、ZAN)] うどんこ CM70オマケ本 (よろず)", | ||
"type" : "doujinshi", | ||
"width" : 1076, | ||
"height" : 1517, | ||
|
||
"artist": [ | ||
"kizuki aruchu", | ||
"zan", | ||
], | ||
"character": [ | ||
"mikuru asahina", | ||
"reisen udongein inaba", | ||
"tsuruya", | ||
], | ||
"group": [ | ||
"udon-ya", | ||
], | ||
"language": [ | ||
"japanese", | ||
], | ||
"parody": [ | ||
"fate stay night", | ||
"super robot wars | super robot taisen", | ||
"the melancholy of haruhi suzumiya | suzumiya haruhi no yuuutsu", | ||
], | ||
"tags": [ | ||
"big breasts", | ||
"okaasan to issho", | ||
"touhou kaeidzuka", | ||
], | ||
}, | ||
|
||
{ | ||
"#url" : "https://hentaiera.com/artist/kujiran/", | ||
"#class" : hentaiera.HentaieraTagExtractor, | ||
"#pattern": hentaiera.HentaieraGalleryExtractor.pattern, | ||
"#count" : range(120, 150), | ||
}, | ||
|
||
{ | ||
"#url" : "https://hentaiera.com/search/?key=kujiran", | ||
"#class" : hentaiera.HentaieraSearchExtractor, | ||
"#pattern": hentaiera.HentaieraGalleryExtractor.pattern, | ||
"#count" : range(120, 150), | ||
}, | ||
|
||
) |