[hiperdex] update domain to 'hipertoon.com' (#6420)

and fix 'description' extraction
This commit is contained in:
Mike Fährmann
2024-11-05 09:43:03 +01:00
parent 9afbe91f82
commit 0b3ddd01af
4 changed files with 13 additions and 12 deletions

View File

@@ -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">', '</div>'))),
"Summary </h5>", "</div>"))),
"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))