simplify extractor constants
- single strings for URL patterns - tuples instead of lists for 'directory_fmt' and 'test' - single-tuple tests where applicable
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2015-2018 Mike Fährmann
|
||||
# Copyright 2015-2019 Mike Fährmann
|
||||
#
|
||||
# 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
|
||||
@@ -19,17 +19,17 @@ class MangapandaBase():
|
||||
|
||||
class MangapandaMangaExtractor(MangapandaBase, MangareaderMangaExtractor):
|
||||
"""Extractor for manga from mangapanda.com"""
|
||||
pattern = [r"(?:https?://)?((?:www\.)?mangapanda\.com/[^/?&#]+)/?$"]
|
||||
test = [("https://www.mangapanda.com/mushishi", {
|
||||
pattern = r"(?:https?://)?((?:www\.)?mangapanda\.com/[^/?&#]+)/?$"
|
||||
test = ("https://www.mangapanda.com/mushishi", {
|
||||
"url": "357f965732371cac1990fee8b480f62e29141a42",
|
||||
"keyword": "031b3ea085921c552de017ecbb9b906e462229c9",
|
||||
})]
|
||||
})
|
||||
|
||||
|
||||
class MangapandaChapterExtractor(MangapandaBase, MangareaderChapterExtractor):
|
||||
"""Extractor for manga-chapters from mangapanda.com"""
|
||||
pattern = [r"(?:https?://)?(?:www\.)?mangapanda\.com((/[^/?&#]+)/(\d+))"]
|
||||
test = [("https://www.mangapanda.com/red-storm/2", {
|
||||
pattern = r"(?:https?://)?(?:www\.)?mangapanda\.com((/[^/?&#]+)/(\d+))"
|
||||
test = ("https://www.mangapanda.com/red-storm/2", {
|
||||
"url": "1f633f776e950531ba9b1e81965316458e785261",
|
||||
"keyword": "32b5e84017c2bf5f122b339ecf40899e41f18cc9",
|
||||
})]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user