[hiperdex] update domain to hiperdex.net

This commit is contained in:
Mike Fährmann
2020-04-16 20:39:56 +02:00
parent 08674a91f3
commit d5273f9b0c
2 changed files with 51 additions and 43 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.com/"""
"""Extractors for https://hiperdex.net/"""
from .common import ChapterExtractor, MangaExtractor
from .. import text
@@ -17,7 +17,7 @@ import re
class HiperdexBase():
"""Base class for hiperdex extractors"""
category = "hiperdex"
root = "https://hiperdex.com"
root = "https://hiperdex.net"
@memcache(keyarg=1)
def manga_data(self, manga, page=None):
@@ -60,26 +60,29 @@ class HiperdexBase():
class HiperdexChapterExtractor(HiperdexBase, ChapterExtractor):
"""Extractor for manga chapters from hiperdex.com"""
pattern = (r"(?:https?://)?(?:www\.)?hiperdex\.com"
"""Extractor for manga chapters from hiperdex.net"""
pattern = (r"(?:https?://)?(?:www\.)?hiperdex\.(?:net|com)"
r"(/manga/([^/?&#]+)/([^/?&#]+))")
test = ("https://hiperdex.com/manga/domestic-na-kanojo/154-5/", {
"pattern": r"https://hiperdex.com/wp-content/uploads"
r"/WP-manga/data/manga_\w+/[0-9a-f]{32}/\d+\.webp",
"count": 9,
"keyword": {
"artist" : "Sasuga Kei",
"author" : "Sasuga Kei",
"chapter": 154,
"chapter_minor": ".5",
"description": "re:Natsuo Fujii is in love with his teacher, Hina",
"genre" : list,
"manga" : "Domestic na Kanojo",
"release": 2014,
"score" : float,
"type" : "Manga",
},
})
test = (
("https://hiperdex.net/manga/domestic-na-kanojo/154-5/", {
"pattern": r"https://hiperdex.net/wp-content/uploads"
r"/WP-manga/data/manga_\w+/[0-9a-f]{32}/\d+\.webp",
"count": 9,
"keyword": {
"artist" : "Sasuga Kei",
"author" : "Sasuga Kei",
"chapter": 154,
"chapter_minor": ".5",
"description": "re:Natsuo Fujii is in love with his teacher, ",
"genre" : list,
"manga" : "Domestic na Kanojo",
"release": 2014,
"score" : float,
"type" : "Manga",
},
}),
("https://hiperdex.com/manga/domestic-na-kanojo/154-5/"),
)
def __init__(self, match):
path, self.manga, self.chapter = match.groups()
@@ -97,26 +100,30 @@ class HiperdexChapterExtractor(HiperdexBase, ChapterExtractor):
class HiperdexMangaExtractor(HiperdexBase, MangaExtractor):
"""Extractor for manga from hiperdex.com"""
"""Extractor for manga from hiperdex.net"""
chapterclass = HiperdexChapterExtractor
pattern = r"(?:https?://)?(?:www\.)?hiperdex\.com(/manga/([^/?&#]+))/?$"
test = ("https://hiperdex.com/manga/youre-not-that-special/", {
"count": 51,
"pattern": HiperdexChapterExtractor.pattern,
"keyword": {
"artist" : "Bolp",
"author" : "Abyo4",
"chapter": int,
"chapter_minor": "",
"description": "re:I didnt think much of the creepy girl in ",
"genre" : list,
"manga" : "You're Not That Special!",
"release": 2019,
"score" : float,
"status" : "Completed",
"type" : "Manhwa",
},
})
pattern = (r"(?:https?://)?(?:www\.)?hiperdex\.(?:net|com)"
r"(/manga/([^/?&#]+))/?$")
test = (
("https://hiperdex.net/manga/youre-not-that-special/", {
"count": 51,
"pattern": HiperdexChapterExtractor.pattern,
"keyword": {
"artist" : "Bolp",
"author" : "Abyo4",
"chapter": int,
"chapter_minor": "",
"description": "re:I didnt think much of the creepy girl in ",
"genre" : list,
"manga" : "Youre Not That Special!",
"release": 2019,
"score" : float,
"status" : "Completed",
"type" : "Manhwa",
},
}),
("https://hiperdex.com/manga/youre-not-that-special/"),
)
def __init__(self, match):
path, self.manga = match.groups()
@@ -142,14 +149,15 @@ class HiperdexMangaExtractor(HiperdexBase, MangaExtractor):
class HiperdexArtistExtractor(HiperdexBase, MangaExtractor):
"""Extractor for an artists's manga on hiperdex.com"""
"""Extractor for an artists's manga on hiperdex.net"""
subcategory = "artist"
categorytransfer = False
chapterclass = HiperdexMangaExtractor
reverse = False
pattern = (r"(?:https?://)?(?:www\.)?hiperdex\.com"
pattern = (r"(?:https?://)?(?:www\.)?hiperdex\.(?:net|com)"
r"(/manga-a(?:rtist|uthor)/([^/?&#]+))")
test = (
("https://hiperdex.net/manga-artist/beck-ho-an/"),
("https://hiperdex.com/manga-artist/beck-ho-an/"),
("https://hiperdex.com/manga-author/viagra/", {
"pattern": HiperdexMangaExtractor.pattern,