From 06c798d18e6cb99669d82193a5607aa780269c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 14 Dec 2016 15:34:30 +0100 Subject: [PATCH] [yonkou] add chapter extracter --- README.rst | 3 ++- gallery_dl/extractor/__init__.py | 1 + gallery_dl/extractor/yonkou.py | 25 +++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 gallery_dl/extractor/yonkou.py diff --git a/README.rst b/README.rst index c1a90ebd..ea8e8703 100644 --- a/README.rst +++ b/README.rst @@ -51,7 +51,8 @@ Supported Sites bato.to, dynasty-scans.com, kissmanga.com, kobato.hologfx.com, mangahere.co, mangamint.com, mangapanda.com, mangapark.me, mangareader.net, mangashare.com, mangastream.com, powermanga.org, raw.senmanga.com, - reader.sensescans.com, thespectrum.net + reader.sensescans.com, thespectrum.net, slide.world-three.org, + yonkouprod.com * Comic: readcomiconline.to * Hentai: diff --git a/gallery_dl/extractor/__init__.py b/gallery_dl/extractor/__init__.py index bb6b8db3..53f733f1 100644 --- a/gallery_dl/extractor/__init__.py +++ b/gallery_dl/extractor/__init__.py @@ -63,6 +63,7 @@ modules = [ "whentai", "worldthree", "yandere", + "yonkou", "imagehosts", "recursive", "test", diff --git a/gallery_dl/extractor/yonkou.py b/gallery_dl/extractor/yonkou.py new file mode 100644 index 00000000..a6b125cc --- /dev/null +++ b/gallery_dl/extractor/yonkou.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- + +# Copyright 2016 Mike Fährmann +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. + +"""Extract manga-chapters from https://yonkouprod.com/""" + +from .foolslide import FoolslideChapterExtractor + +class YonkouChapterExtractor(FoolslideChapterExtractor): + """Extractor for manga-chapters from yonkouprod.com""" + category = "yonkou" + pattern = [(r"(?:https?://)?(?:www\.)?(yonkouprod\.com/reader/read/" + r"[^/]+/([a-z]{2})/\d+/\d+)")] + test = [("http://yonkouprod.com/reader/read/fairy-tail/en/0/512/", { + "url": "7647850e2b1ad11c2baa9628755bf7f186350a0b", + "keyword": "2e3519670694bd851149f8004a00320b9e962044", + })] + + def __init__(self, match): + url = "https://" + match.group(1) + FoolslideChapterExtractor.__init__(self, url, match.group(2))