From 0b3ddd01af7b2469ce779d2d9e58fa028c91d867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 5 Nov 2024 09:43:03 +0100 Subject: [PATCH] [hiperdex] update domain to 'hipertoon.com' (#6420) and fix 'description' extraction --- docs/supportedsites.md | 4 ++-- gallery_dl/extractor/hiperdex.py | 14 +++++++------- scripts/supportedsites.py | 1 + test/results/hiperdex.py | 6 +++--- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/supportedsites.md b/docs/supportedsites.md index fdecd835..54da76a1 100644 --- a/docs/supportedsites.md +++ b/docs/supportedsites.md @@ -362,8 +362,8 @@ Consider all listed sites to potentially be NSFW. - Hiperdex - https://hiperdex.top/ + Hipertoon + https://hipertoon.com/ Artists, Chapters, Manga diff --git a/gallery_dl/extractor/hiperdex.py b/gallery_dl/extractor/hiperdex.py index 4a9759ff..c939a3c5 100644 --- a/gallery_dl/extractor/hiperdex.py +++ b/gallery_dl/extractor/hiperdex.py @@ -6,7 +6,7 @@ # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. -"""Extractors for https://hiperdex.top/""" +"""Extractors for https://hipertoon.com/""" from .common import ChapterExtractor, MangaExtractor from .. import text @@ -14,13 +14,13 @@ from ..cache import memcache import re BASE_PATTERN = (r"((?:https?://)?(?:www\.)?" - r"(?:1st)?hiperdex\d?\.(?:com|net|info|top))") + r"(?:1st)?hiper(?:dex|toon)\d?\.(?:com|net|info|top))") class HiperdexBase(): """Base class for hiperdex extractors""" category = "hiperdex" - root = "https://hiperdex.top" + root = "https://hipertoon.com" @memcache(keyarg=1) def manga_data(self, manga, page=None): @@ -49,7 +49,7 @@ class HiperdexBase(): "status" : extr( 'class="summary-content">', '<').strip(), "description": text.remove_html(text.unescape(extr( - 'class="description-summary">', ''))), + "Summary ", ""))), "language": "English", "lang" : "en", } @@ -69,7 +69,7 @@ class HiperdexBase(): class HiperdexChapterExtractor(HiperdexBase, ChapterExtractor): """Extractor for hiperdex manga chapters""" pattern = BASE_PATTERN + r"(/mangas?/([^/?#]+)/([^/?#]+))" - example = "https://hiperdex.top/manga/MANGA/CHAPTER/" + example = "https://hipertoon.com/manga/MANGA/CHAPTER/" def __init__(self, match): root, path, self.manga, self.chapter = match.groups() @@ -91,7 +91,7 @@ class HiperdexMangaExtractor(HiperdexBase, MangaExtractor): """Extractor for hiperdex manga""" chapterclass = HiperdexChapterExtractor pattern = BASE_PATTERN + r"(/mangas?/([^/?#]+))/?$" - example = "https://hiperdex.top/manga/MANGA/" + example = "https://hipertoon.com/manga/MANGA/" def __init__(self, match): root, path, self.manga = match.groups() @@ -127,7 +127,7 @@ class HiperdexArtistExtractor(HiperdexBase, MangaExtractor): chapterclass = HiperdexMangaExtractor reverse = False pattern = BASE_PATTERN + r"(/manga-a(?:rtist|uthor)/(?:[^/?#]+))" - example = "https://hiperdex.top/manga-artist/NAME/" + example = "https://hipertoon.com/manga-artist/NAME/" def __init__(self, match): self.root = text.ensure_http_scheme(match.group(1)) diff --git a/scripts/supportedsites.py b/scripts/supportedsites.py index c82d384c..406860c4 100755 --- a/scripts/supportedsites.py +++ b/scripts/supportedsites.py @@ -66,6 +66,7 @@ CATEGORY_MAP = { "hentaihere" : "HentaiHere", "hentaiimg" : "Hentai Image", "hentainexus" : "HentaiNexus", + "hiperdex" : "Hipertoon", "hitomi" : "Hitomi.la", "horne" : "horne", "idolcomplex" : "Idol Complex", diff --git a/test/results/hiperdex.py b/test/results/hiperdex.py index 5c17659b..a65c0928 100644 --- a/test/results/hiperdex.py +++ b/test/results/hiperdex.py @@ -9,17 +9,17 @@ from gallery_dl.extractor import hiperdex __tests__ = ( { - "#url" : "https://hiperdex.com/manga/domestic-na-kanojo/154-5/", + "#url" : "https://hipertoon.com/manga/domestic-na-kanojo/154-5/", "#category": ("", "hiperdex", "chapter"), "#class" : hiperdex.HiperdexChapterExtractor, - "#pattern" : r"https://(1st)?hiperdex\d?.(com|net|info|top)/wp-content/uploads/WP-manga/data/manga_\w+/[0-9a-f]{32}/\d+\.webp", + "#pattern" : r"https://(1st)?hiper(dex|toon)\d?.(com|net|info|top)/wp-content/uploads/WP-manga/data/manga_\w+/[0-9a-f]{32}/\d+\.webp", "#count" : 9, "artist" : "Sasuga Kei", "author" : "Sasuga Kei", "chapter" : 154, "chapter_minor": ".5", - "description" : r"re:Natsuo Fujii is in love with his teacher, ", + "description" : "Natsuo Fujii is in love with his teacher, Hina. Attempting to forget his feelings towards her, Natsuo goes to a mixer with his classmates where he meets an odd girl named Rui Tachibana. In a strange turn of events, Rui asks Natsuo to sneak out with her and do her a favor. To his surprise, their destination is Rui’s house—and her request is for him to have sex with her. There’s no love behind the act; she just wants to learn from the experience. Thinking that it might help him forget about Hina, Natsuo hesitantly agrees. After this unusual encounter Natsuo now faces a new problem. With his father remarrying, he ends up with a new pair of stepsisters; unfortunately, he knows these two girls all too well. He soon finds out his new siblings are none other than Hina and Rui! Now living with both the teacher he loves and the girl with whom he had his “first time,” Natsuo finds himself in an unexpected love triangle as he climbs ever closer towards adulthood.", "genre" : list, "manga" : "Domestic na Kanojo", "release" : 2014,