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:
parent
394241cd6f
commit
4a60f6068a
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user