2020-04-18 11:45:44 +00:00
|
|
|
# SPDX-License-Identifier: MIT
|
2016-10-28 22:21:41 +00:00
|
|
|
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
|
2014-01-05 15:50:57 +00:00
|
|
|
# Copyright (C) 2012-2014 Bastian Kleineidam
|
2022-06-06 10:08:32 +00:00
|
|
|
# Copyright (C) 2015-2022 Tobias Gruetzmacher
|
2020-07-31 20:56:30 +00:00
|
|
|
from ..helpers import indirectStarter
|
2022-06-06 10:08:32 +00:00
|
|
|
from ..scraper import ParserScraper
|
2017-02-13 22:41:45 +00:00
|
|
|
from ..util import getQueryParams
|
2016-04-13 18:01:51 +00:00
|
|
|
|
2012-12-04 06:02:40 +00:00
|
|
|
|
2022-06-06 10:08:32 +00:00
|
|
|
class CloneManga(ParserScraper):
|
2017-02-13 22:41:45 +00:00
|
|
|
baseUrl = 'http://manga.clone-army.org'
|
2020-07-31 20:56:30 +00:00
|
|
|
imageSearch = '//div[d:class("subsectionContainer")]//img'
|
2017-02-13 22:41:45 +00:00
|
|
|
prevSearch = '//a[span[text()="<<"]]'
|
|
|
|
latestSearch = '//a[span[text()=">|"]]'
|
|
|
|
starter = indirectStarter
|
2016-05-20 23:18:42 +00:00
|
|
|
help = 'Index format: n'
|
2012-12-04 06:02:40 +00:00
|
|
|
|
2017-02-13 22:41:45 +00:00
|
|
|
def __init__(self, name, shortName, endOfLife=False):
|
2022-06-06 10:08:32 +00:00
|
|
|
super().__init__('CloneManga/' + name)
|
2017-02-13 22:41:45 +00:00
|
|
|
self.stripUrl = '%s/viewer.php?page=%%s&lang=&series=%s&HUDoff=' % (
|
|
|
|
self.baseUrl, shortName)
|
|
|
|
self.url = self.stripUrl % '1'
|
|
|
|
self.endOfLife = endOfLife
|
2012-12-04 06:02:40 +00:00
|
|
|
|
2016-04-21 06:20:49 +00:00
|
|
|
def namer(self, image_url, page_url):
|
2019-12-30 23:50:22 +00:00
|
|
|
origname = image_url.rsplit('/', 1)[1]
|
|
|
|
params = getQueryParams(page_url)
|
|
|
|
if 'page' in params:
|
|
|
|
return '{:03}_{}'.format(int(params['page'][0]), origname)
|
|
|
|
else:
|
|
|
|
return origname
|
2012-12-04 06:02:40 +00:00
|
|
|
|
2016-05-20 23:18:42 +00:00
|
|
|
@classmethod
|
|
|
|
def getmodules(cls):
|
2017-02-13 22:41:45 +00:00
|
|
|
return (
|
|
|
|
cls('ACaptainsWorries', 'captains_worries'),
|
|
|
|
cls('AHimehornsDailyLife', 'himehorn'),
|
|
|
|
cls('AprilAndMay', 'anm', endOfLife=True),
|
|
|
|
cls('DollAndMaker', 'maria_doll', endOfLife=True),
|
|
|
|
cls('Kanami', 'kanami', endOfLife=True),
|
|
|
|
cls('MomokaCorner', 'momoka', endOfLife=True),
|
|
|
|
cls('MyShutInVampirePrincess', 'snax'),
|
|
|
|
cls('NanasEverydayLife', 'nana', endOfLife=True),
|
|
|
|
cls('NNN', 'nnn', endOfLife=True),
|
|
|
|
cls('PaperEleven', 'pxi', endOfLife=True),
|
|
|
|
cls('PennyTribute', 'penny', endOfLife=True),
|
2016-05-20 23:18:42 +00:00
|
|
|
cls('Tomoyo42sRoom', 't42r'),
|
2017-02-13 22:41:45 +00:00
|
|
|
)
|