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

[mangapanda] add extractor

This commit is contained in:
Mike Fährmann 2015-11-08 00:02:37 +01:00
parent 5abe32a32c
commit 009761fcd5
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
3 changed files with 30 additions and 1 deletions

View File

@ -29,6 +29,7 @@ modules = [
"imgur",
"kissmanga",
"konachan",
"mangapanda",
"mangareader",
"nhentai",
"nijie",

View File

@ -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"

View File

@ -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",