diff --git a/gallery_dl/extractor/__init__.py b/gallery_dl/extractor/__init__.py index 78ca0629..8622978a 100644 --- a/gallery_dl/extractor/__init__.py +++ b/gallery_dl/extractor/__init__.py @@ -29,6 +29,7 @@ modules = [ "imgur", "kissmanga", "konachan", + "mangapanda", "mangareader", "nhentai", "nijie", diff --git a/gallery_dl/extractor/mangapanda.py b/gallery_dl/extractor/mangapanda.py new file mode 100644 index 00000000..b5db2679 --- /dev/null +++ b/gallery_dl/extractor/mangapanda.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- + +# Copyright 2015 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 pages from http://www.mangapanda.com/""" + +from .mangareader import MangaReaderExtractor + +info = { + "category": "mangapanda", + "extractor": "MangaPandaExtractor", + "directory": ["{category}", "{manga}", "c{chapter:>03} - {title}"], + "filename": "{manga}_c{chapter:>03}_{page:>03}.{extension}", + "pattern": [ + r"(?:https?://)?(?:www\.)?mangapanda\.com((/[^/]+)/(\d+))", + r"(?:https?://)?(?:www\.)?mangapanda\.com(/\d+-\d+-\d+(/[^/]+)/chapter-(\d+).html)", + ], +} + +class MangaPandaExtractor(MangaReaderExtractor): + + category = info["category"] + url_base = "http://www.mangapanda.com" diff --git a/gallery_dl/extractor/mangareader.py b/gallery_dl/extractor/mangareader.py index 267966d1..87dc0a02 100644 --- a/gallery_dl/extractor/mangareader.py +++ b/gallery_dl/extractor/mangareader.py @@ -25,6 +25,7 @@ info = { class MangaReaderExtractor(AsynchronousExtractor): + category = info["category"] url_base = "http://www.mangareader.net" def __init__(self, match): @@ -48,7 +49,7 @@ class MangaReaderExtractor(AsynchronousExtractor): """Collect metadata for extractor-job""" page = self.request(self.url_base + self.url_title).text data = { - "category": info["category"], + "category": self.category, "chapter": self.chapter, "lang": "en", "language": "English",