2015-10-08 20:43:52 +02:00
|
|
|
# -*- 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://powermanga.org/"""
|
|
|
|
|
2015-11-01 01:47:58 +01:00
|
|
|
from .redhawkscans import RedHawkScansExtractor
|
2015-10-08 20:43:52 +02:00
|
|
|
|
|
|
|
info = {
|
|
|
|
"category": "powermanga",
|
|
|
|
"extractor": "PowerMangaExtractor",
|
2015-11-01 01:47:58 +01:00
|
|
|
"directory": ["{category}", "{manga}", "c{chapter:>03}{chapter-minor} - {title}"],
|
|
|
|
"filename": "{manga}_c{chapter:>03}{chapter-minor}_{page:>03}.{extension}",
|
2015-10-08 20:43:52 +02:00
|
|
|
"pattern": [
|
2015-11-02 00:21:17 +01:00
|
|
|
(r"(?:https?://)?read(?:er)?\.powermanga\.org/read/"
|
|
|
|
r"(.+/([a-z]{2})/\d+/\d+)(?:/page)?"),
|
2015-10-08 20:43:52 +02:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2015-11-01 01:47:58 +01:00
|
|
|
class PowerMangaExtractor(RedHawkScansExtractor):
|
2015-10-08 20:43:52 +02:00
|
|
|
|
|
|
|
def __init__(self, match):
|
2015-11-01 01:47:58 +01:00
|
|
|
RedHawkScansExtractor.__init__(self, match)
|
|
|
|
extra = "er" if "://reader" in match.string else ""
|
|
|
|
self.category = info["category"]
|
|
|
|
self.url_base = "https://read" + extra + ".powermanga.org/read/"
|