1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-23 19:22:32 +01:00
gallery-dl/gallery_dl/extractor/mangapanda.py

40 lines
1.4 KiB
Python
Raw Normal View History

2015-11-08 00:02:37 +01:00
# -*- coding: utf-8 -*-
# Copyright 2015-2018 Mike Fährmann
2015-11-08 00:02:37 +01:00
#
# 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 and entire manga from https://www.mangapanda.com/"""
2015-11-08 00:02:37 +01:00
from .mangareader import MangareaderMangaExtractor, MangareaderChapterExtractor
2015-11-08 00:02:37 +01:00
2017-02-01 00:53:19 +01:00
class MangapandaBase():
2015-11-28 22:21:35 +01:00
"""Base class for mangapanda extractors"""
2015-11-21 04:26:30 +01:00
category = "mangapanda"
root = "https://www.mangapanda.com"
2015-11-27 00:14:09 +01:00
class MangapandaMangaExtractor(MangapandaBase, MangareaderMangaExtractor):
"""Extractor for manga from mangapanda.com"""
2017-10-09 22:37:50 +02:00
pattern = [r"(?:https?://)?((?:www\.)?mangapanda\.com/[^/?&#]+)/?$"]
test = [("https://www.mangapanda.com/mushishi", {
"url": "357f965732371cac1990fee8b480f62e29141a42",
2017-09-23 15:42:50 +02:00
"keyword": "031b3ea085921c552de017ecbb9b906e462229c9",
2015-12-14 03:00:58 +01:00
})]
2015-11-27 00:14:09 +01:00
2017-02-01 00:53:19 +01:00
class MangapandaChapterExtractor(MangapandaBase, MangareaderChapterExtractor):
"""Extractor for manga-chapters from mangapanda.com"""
2015-11-21 04:26:30 +01:00
pattern = [
2017-10-09 22:37:50 +02:00
(r"(?:https?://)?(?:www\.)?mangapanda\.com((/[^/?&#]+)/(\d+))"),
2017-02-01 00:53:19 +01:00
(r"(?:https?://)?(?:www\.)?mangapanda\.com"
2017-10-09 22:37:50 +02:00
r"(/\d+-\d+-\d+(/[^/]+)/chapter-(\d+)\.html)"),
2015-11-21 04:26:30 +01:00
]
test = [("https://www.mangapanda.com/red-storm/2", {
"url": "1f633f776e950531ba9b1e81965316458e785261",
"keyword": "32b5e84017c2bf5f122b339ecf40899e41f18cc9",
2015-12-14 03:00:58 +01:00
})]