[senmanga] ensure download URLs have a scheme (#4235)

This commit is contained in:
Mike Fährmann
2023-06-27 13:45:51 +02:00
parent ccbc1a1d55
commit 260ff55e19

View File

@@ -58,6 +58,12 @@ class SenmangaChapterExtractor(ChapterExtractor):
"manga": "Akabane Honeko no Bodyguard", "manga": "Akabane Honeko no Bodyguard",
}, },
}), }),
# no http scheme ()
("https://raw.senmanga.com/amama-cinderella/3", {
"pattern": r"^https://kumacdn.club/image-new-2/a/amama-cinderella"
r"/chapter-3/.+\.jpg",
"count": 30,
}),
) )
def __init__(self, match): def __init__(self, match):
@@ -82,7 +88,7 @@ class SenmangaChapterExtractor(ChapterExtractor):
def images(self, page): def images(self, page):
return [ return [
(url, None) (text.ensure_http_scheme(url), None)
for url in text.extract_iter( for url in text.extract_iter(
page, '<img class="picture" src="', '"') page, '<img class="picture" src="', '"')
] ]