mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 20:22:36 +01:00
[mangapanda] add extractor
This commit is contained in:
parent
5abe32a32c
commit
009761fcd5
@ -29,6 +29,7 @@ modules = [
|
|||||||
"imgur",
|
"imgur",
|
||||||
"kissmanga",
|
"kissmanga",
|
||||||
"konachan",
|
"konachan",
|
||||||
|
"mangapanda",
|
||||||
"mangareader",
|
"mangareader",
|
||||||
"nhentai",
|
"nhentai",
|
||||||
"nijie",
|
"nijie",
|
||||||
|
27
gallery_dl/extractor/mangapanda.py
Normal file
27
gallery_dl/extractor/mangapanda.py
Normal 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"
|
@ -25,6 +25,7 @@ info = {
|
|||||||
|
|
||||||
class MangaReaderExtractor(AsynchronousExtractor):
|
class MangaReaderExtractor(AsynchronousExtractor):
|
||||||
|
|
||||||
|
category = info["category"]
|
||||||
url_base = "http://www.mangareader.net"
|
url_base = "http://www.mangareader.net"
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
@ -48,7 +49,7 @@ class MangaReaderExtractor(AsynchronousExtractor):
|
|||||||
"""Collect metadata for extractor-job"""
|
"""Collect metadata for extractor-job"""
|
||||||
page = self.request(self.url_base + self.url_title).text
|
page = self.request(self.url_base + self.url_title).text
|
||||||
data = {
|
data = {
|
||||||
"category": info["category"],
|
"category": self.category,
|
||||||
"chapter": self.chapter,
|
"chapter": self.chapter,
|
||||||
"lang": "en",
|
"lang": "en",
|
||||||
"language": "English",
|
"language": "English",
|
||||||
|
Loading…
Reference in New Issue
Block a user