[hiperdex] update domain to 'hiperdex.top' (#5635)
This commit is contained in:
@@ -321,7 +321,7 @@ Consider all listed sites to potentially be NSFW.
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Hiperdex</td>
|
<td>Hiperdex</td>
|
||||||
<td>https://hiperdex.com/</td>
|
<td>https://hiperdex.top/</td>
|
||||||
<td>Artists, Chapters, Manga</td>
|
<td>Artists, Chapters, Manga</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
# it under the terms of the GNU General Public License version 2 as
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
# published by the Free Software Foundation.
|
# published by the Free Software Foundation.
|
||||||
|
|
||||||
"""Extractors for https://hiperdex.com/"""
|
"""Extractors for https://hiperdex.top/"""
|
||||||
|
|
||||||
from .common import ChapterExtractor, MangaExtractor
|
from .common import ChapterExtractor, MangaExtractor
|
||||||
from .. import text
|
from .. import text
|
||||||
@@ -14,18 +14,18 @@ from ..cache import memcache
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
BASE_PATTERN = (r"((?:https?://)?(?:www\.)?"
|
BASE_PATTERN = (r"((?:https?://)?(?:www\.)?"
|
||||||
r"(?:1st)?hiperdex\d?\.(?:com|net|info))")
|
r"(?:1st)?hiperdex\d?\.(?:com|net|info|top))")
|
||||||
|
|
||||||
|
|
||||||
class HiperdexBase():
|
class HiperdexBase():
|
||||||
"""Base class for hiperdex extractors"""
|
"""Base class for hiperdex extractors"""
|
||||||
category = "hiperdex"
|
category = "hiperdex"
|
||||||
root = "https://hiperdex.com"
|
root = "https://hiperdex.top"
|
||||||
|
|
||||||
@memcache(keyarg=1)
|
@memcache(keyarg=1)
|
||||||
def manga_data(self, manga, page=None):
|
def manga_data(self, manga, page=None):
|
||||||
if not page:
|
if not page:
|
||||||
url = "{}/mangas/{}/".format(self.root, manga)
|
url = "{}/manga/{}/".format(self.root, manga)
|
||||||
page = self.request(url).text
|
page = self.request(url).text
|
||||||
extr = text.extract_from(page)
|
extr = text.extract_from(page)
|
||||||
|
|
||||||
@@ -67,9 +67,9 @@ class HiperdexBase():
|
|||||||
|
|
||||||
|
|
||||||
class HiperdexChapterExtractor(HiperdexBase, ChapterExtractor):
|
class HiperdexChapterExtractor(HiperdexBase, ChapterExtractor):
|
||||||
"""Extractor for manga chapters from hiperdex.com"""
|
"""Extractor for hiperdex manga chapters"""
|
||||||
pattern = BASE_PATTERN + r"(/mangas?/([^/?#]+)/([^/?#]+))"
|
pattern = BASE_PATTERN + r"(/mangas?/([^/?#]+)/([^/?#]+))"
|
||||||
example = "https://hiperdex.com/mangas/MANGA/CHAPTER/"
|
example = "https://hiperdex.top/manga/MANGA/CHAPTER/"
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
root, path, self.manga, self.chapter = match.groups()
|
root, path, self.manga, self.chapter = match.groups()
|
||||||
@@ -88,10 +88,10 @@ class HiperdexChapterExtractor(HiperdexBase, ChapterExtractor):
|
|||||||
|
|
||||||
|
|
||||||
class HiperdexMangaExtractor(HiperdexBase, MangaExtractor):
|
class HiperdexMangaExtractor(HiperdexBase, MangaExtractor):
|
||||||
"""Extractor for manga from hiperdex.com"""
|
"""Extractor for hiperdex manga"""
|
||||||
chapterclass = HiperdexChapterExtractor
|
chapterclass = HiperdexChapterExtractor
|
||||||
pattern = BASE_PATTERN + r"(/mangas?/([^/?#]+))/?$"
|
pattern = BASE_PATTERN + r"(/mangas?/([^/?#]+))/?$"
|
||||||
example = "https://hiperdex.com/mangas/MANGA/"
|
example = "https://hiperdex.top/manga/MANGA/"
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
root, path, self.manga = match.groups()
|
root, path, self.manga = match.groups()
|
||||||
@@ -121,13 +121,13 @@ class HiperdexMangaExtractor(HiperdexBase, MangaExtractor):
|
|||||||
|
|
||||||
|
|
||||||
class HiperdexArtistExtractor(HiperdexBase, MangaExtractor):
|
class HiperdexArtistExtractor(HiperdexBase, MangaExtractor):
|
||||||
"""Extractor for an artists's manga on hiperdex.com"""
|
"""Extractor for an artists's manga on hiperdex"""
|
||||||
subcategory = "artist"
|
subcategory = "artist"
|
||||||
categorytransfer = False
|
categorytransfer = False
|
||||||
chapterclass = HiperdexMangaExtractor
|
chapterclass = HiperdexMangaExtractor
|
||||||
reverse = False
|
reverse = False
|
||||||
pattern = BASE_PATTERN + r"(/manga-a(?:rtist|uthor)/(?:[^/?#]+))"
|
pattern = BASE_PATTERN + r"(/manga-a(?:rtist|uthor)/(?:[^/?#]+))"
|
||||||
example = "https://hiperdex.com/manga-artist/NAME/"
|
example = "https://hiperdex.top/manga-artist/NAME/"
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
self.root = text.ensure_http_scheme(match.group(1))
|
self.root = text.ensure_http_scheme(match.group(1))
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ from gallery_dl.extractor import hiperdex
|
|||||||
|
|
||||||
__tests__ = (
|
__tests__ = (
|
||||||
{
|
{
|
||||||
"#url" : "https://hiperdex.com/mangas/domestic-na-kanojo/154-5/",
|
"#url" : "https://hiperdex.com/manga/domestic-na-kanojo/154-5/",
|
||||||
"#category": ("", "hiperdex", "chapter"),
|
"#category": ("", "hiperdex", "chapter"),
|
||||||
"#class" : hiperdex.HiperdexChapterExtractor,
|
"#class" : hiperdex.HiperdexChapterExtractor,
|
||||||
"#pattern" : r"https://(1st)?hiperdex\d?.(com|net|info)/wp-content/uploads/WP-manga/data/manga_\w+/[0-9a-f]{32}/\d+\.webp",
|
"#pattern" : r"https://(1st)?hiperdex\d?.(com|net|info|top)/wp-content/uploads/WP-manga/data/manga_\w+/[0-9a-f]{32}/\d+\.webp",
|
||||||
"#count" : 9,
|
"#count" : 9,
|
||||||
|
|
||||||
"artist" : "Sasuga Kei",
|
"artist" : "Sasuga Kei",
|
||||||
@@ -28,7 +28,7 @@ __tests__ = (
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://hiperdex.com/manga/domestic-na-kanojo/154-5/",
|
"#url" : "https://hiperdex.com/mangas/domestic-na-kanojo/154-5/",
|
||||||
"#category": ("", "hiperdex", "chapter"),
|
"#category": ("", "hiperdex", "chapter"),
|
||||||
"#class" : hiperdex.HiperdexChapterExtractor,
|
"#class" : hiperdex.HiperdexChapterExtractor,
|
||||||
},
|
},
|
||||||
@@ -57,6 +57,12 @@ __tests__ = (
|
|||||||
"#class" : hiperdex.HiperdexChapterExtractor,
|
"#class" : hiperdex.HiperdexChapterExtractor,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://hiperdex.top/manga/domestic-na-kanojo/154-5/",
|
||||||
|
"#category": ("", "hiperdex", "chapter"),
|
||||||
|
"#class" : hiperdex.HiperdexChapterExtractor,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://hiperdex.com/manga/1603231576-youre-not-that-special/",
|
"#url" : "https://hiperdex.com/manga/1603231576-youre-not-that-special/",
|
||||||
"#category": ("", "hiperdex", "manga"),
|
"#category": ("", "hiperdex", "manga"),
|
||||||
|
|||||||
Reference in New Issue
Block a user