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:
Mike Fährmann
2019-02-08 13:45:40 +01:00
parent 34bab080ae
commit 6284731107
84 changed files with 1080 additions and 1108 deletions

View File

@@ -16,12 +16,12 @@ class MangastreamChapterExtractor(ChapterExtractor):
"""Extractor for manga-chapters from mangastream.com"""
category = "mangastream"
archive_fmt = "{chapter_id}_{page}"
pattern = [(r"(?:https?://)?(?:www\.)?(?:readms\.net|mangastream\.com)/"
r"r(?:ead)?/([^/]*/([^/]+)/(\d+))")]
test = [
("https://readms.net/r/onepunch_man/087/4874/1", None),
("https://mangastream.com/r/onepunch_man/087/4874/1", None),
]
pattern = (r"(?:https?://)?(?:www\.)?(?:readms\.net|mangastream\.com)/"
r"r(?:ead)?/([^/]*/([^/]+)/(\d+))")
test = (
("https://readms.net/r/onepunch_man/087/4874/1"),
("https://mangastream.com/r/onepunch_man/087/4874/1"),
)
root = "https://readms.net"
def __init__(self, match):