1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 04:02:32 +01:00

[mangazuki] add manga extractor

This commit is contained in:
Mike Fährmann 2017-07-20 16:02:09 +02:00
parent 394241cd6f
commit 4a60f6068a
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 26 additions and 2 deletions

View File

@ -49,7 +49,7 @@ Manga Stream https://mangastream.com/ Chapters
Mangapanda http://www.mangapanda.com/ Chapters, Manga
MangaPark http://mangapark.me/ Chapters, Manga
Mangareader http://www.mangareader.net/ Chapters, Manga
Mangazuki https://mangazuki.co/ Chapters
Mangazuki https://mangazuki.co/ Chapters, Manga
nhentai https://nhentai.net/ Galleries
Niconico Seiga http://seiga.nicovideo.jp Images from Users, individual Images Required
nijie https://nijie.info/ Images from Users, individual Images Required

View File

@ -8,7 +8,7 @@
"""Extract manga-chapters and entire manga from https://mangazuki.co/"""
from .common import Extractor, Message
from .common import Extractor, MangaExtractor, Message
from .. import text, exception
@ -58,3 +58,27 @@ class MangazukiChapterExtractor(Extractor):
def get_images(page):
"""Return a list of all image-urls"""
return list(text.extract_iter(page, 'data-src="', '"'))
class MangazukiMangaExtractor(MangaExtractor):
"""Extractor for manga from mangazuki.co"""
category = "mangazuki"
pattern = [r"(?:https?://)?(?:www\.)?(mangazuki\.co/series/[^/?&#]+)"]
scheme = "https"
test = [("https://mangazuki.co/series/Double-Casting", {
"url": "aab747414191b14e768f4a1eb148448d83ef2e14",
})]
def chapters(self, page):
params = {"page": 1}
chlist = []
while True:
chlist.extend(
text.extract_iter(page, '<li class="media"><a href="', '"'))
if 'class="next disabled"' in page:
break
params["page"] += 1
page = self.request(self.url, params=params).text
return chlist