[hiperdex] match 'hiperdex2.com' URLs
still doesn't properly work due to Cloudflare CAPTCHA and IUAM page
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright 2020 Mike Fährmann
|
# Copyright 2020-2021 Mike Fährmann
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
@@ -13,14 +13,13 @@ from .. import text
|
|||||||
from ..cache import memcache
|
from ..cache import memcache
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
BASE_PATTERN = r"(?:https?://)?(?:www\.)?hiperdex\d?\.(?:com|net|info)"
|
||||||
BASE_PATTERN = r"(?:https?://)?(?:www\.)?hiperdex\.(?:com|net|info)"
|
|
||||||
|
|
||||||
|
|
||||||
class HiperdexBase():
|
class HiperdexBase():
|
||||||
"""Base class for hiperdex extractors"""
|
"""Base class for hiperdex extractors"""
|
||||||
category = "hiperdex"
|
category = "hiperdex"
|
||||||
root = "https://hiperdex.com"
|
root = "https://hiperdex2.com"
|
||||||
|
|
||||||
@memcache(keyarg=1)
|
@memcache(keyarg=1)
|
||||||
def manga_data(self, manga, page=None):
|
def manga_data(self, manga, page=None):
|
||||||
@@ -66,8 +65,8 @@ class HiperdexChapterExtractor(HiperdexBase, ChapterExtractor):
|
|||||||
"""Extractor for manga chapters from hiperdex.com"""
|
"""Extractor for manga chapters from hiperdex.com"""
|
||||||
pattern = BASE_PATTERN + r"(/manga/([^/?#]+)/([^/?#]+))"
|
pattern = BASE_PATTERN + r"(/manga/([^/?#]+)/([^/?#]+))"
|
||||||
test = (
|
test = (
|
||||||
("https://hiperdex.com/manga/domestic-na-kanojo/154-5/", {
|
("https://hiperdex2.com/manga/domestic-na-kanojo/154-5/", {
|
||||||
"pattern": r"https://hiperdex.(com|net|info)/wp-content/uploads"
|
"pattern": r"https://hiperdex\d?.(com|net|info)/wp-content/uploads"
|
||||||
r"/WP-manga/data/manga_\w+/[0-9a-f]{32}/\d+\.webp",
|
r"/WP-manga/data/manga_\w+/[0-9a-f]{32}/\d+\.webp",
|
||||||
"count": 9,
|
"count": 9,
|
||||||
"keyword": {
|
"keyword": {
|
||||||
@@ -107,7 +106,7 @@ class HiperdexMangaExtractor(HiperdexBase, MangaExtractor):
|
|||||||
chapterclass = HiperdexChapterExtractor
|
chapterclass = HiperdexChapterExtractor
|
||||||
pattern = BASE_PATTERN + r"(/manga/([^/?#]+))/?$"
|
pattern = BASE_PATTERN + r"(/manga/([^/?#]+))/?$"
|
||||||
test = (
|
test = (
|
||||||
("https://hiperdex.com/manga/youre-not-that-special/", {
|
("https://hiperdex2.com/manga/youre-not-that-special/", {
|
||||||
"count": 51,
|
"count": 51,
|
||||||
"pattern": HiperdexChapterExtractor.pattern,
|
"pattern": HiperdexChapterExtractor.pattern,
|
||||||
"keyword": {
|
"keyword": {
|
||||||
@@ -159,7 +158,7 @@ class HiperdexArtistExtractor(HiperdexBase, MangaExtractor):
|
|||||||
reverse = False
|
reverse = False
|
||||||
pattern = BASE_PATTERN + r"(/manga-a(?:rtist|uthor)/([^/?#]+))"
|
pattern = BASE_PATTERN + r"(/manga-a(?:rtist|uthor)/([^/?#]+))"
|
||||||
test = (
|
test = (
|
||||||
("https://hiperdex.com/manga-artist/beck-ho-an/"),
|
("https://hiperdex2.com/manga-artist/beck-ho-an/"),
|
||||||
("https://hiperdex.net/manga-artist/beck-ho-an/"),
|
("https://hiperdex.net/manga-artist/beck-ho-an/"),
|
||||||
("https://hiperdex.info/manga-artist/beck-ho-an/"),
|
("https://hiperdex.info/manga-artist/beck-ho-an/"),
|
||||||
("https://hiperdex.com/manga-author/viagra/", {
|
("https://hiperdex.com/manga-author/viagra/", {
|
||||||
|
|||||||
Reference in New Issue
Block a user