1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 20:22:36 +01:00

[mangastream] adjust regex

This commit is contained in:
Mike Fährmann 2016-04-20 08:28:17 +02:00
parent 1416e7f6f7
commit 7af8ae509c
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -14,14 +14,14 @@ from .. import text
class MangaStreamExtractor(AsynchronousExtractor):
category = "mangastream"
directory_fmt = ["{category}", "{manga}", "c{chapter:>03}{chapter-minor} - {title}"]
filename_fmt = "{manga}_c{chapter:>03}{chapter-minor}_{page:>03}.{extension}"
pattern = [r"(?:https?://)?(?:www\.)?readms\.com/r/([^/]*/(\d+)([^/]*)?/(\d+))"]
directory_fmt = ["{category}", "{manga}", "c{chapter} - {title}"]
filename_fmt = "{manga}_c{chapter}_{page:>03}.{extension}"
pattern = [r"(?:https?://)?(?:www\.)?readms\.com/r/([^/]*/([^/]+)/(\d+))"]
url_base = "https://readms.com/r/"
def __init__(self, match):
AsynchronousExtractor.__init__(self)
self.part, self.chapter, self.ch_minor,self.ch_id = match.groups()
self.part, self.chapter, self.ch_id = match.groups()
def items(self):
page = self.request(self.url_base + self.part).text
@ -41,8 +41,7 @@ class MangaStreamExtractor(AsynchronousExtractor):
"""Collect metadata for extractor-job"""
data = {
"category": self.category,
"chapter": self.chapter,
"chapter-minor": self.ch_minor,
"chapter": text.unquote(self.chapter),
"chapter-id": self.ch_id,
"lang": "en",
"language": "English",