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
|
2020-01-09 02:05:05 +00:00
|
|
|
# Copyright (C) 2015-2020 Tobias Gruetzmacher
|
2020-01-13 06:34:05 +00:00
|
|
|
# Copyright (C) 2019-2020 Daniel Ring
|
2022-06-06 10:08:32 +00:00
|
|
|
from .common import WordPressScraper, WordPressNavi
|
2016-05-20 23:18:42 +00:00
|
|
|
|
|
|
|
|
2022-06-06 10:08:32 +00:00
|
|
|
class PetiteSymphony(WordPressNavi):
|
2016-05-20 23:18:42 +00:00
|
|
|
multipleImagesPerStrip = True
|
|
|
|
help = 'Index format: named number'
|
|
|
|
|
|
|
|
def __init__(self, name):
|
|
|
|
super(PetiteSymphony, self).__init__('PetiteSymphony/' +
|
|
|
|
name.capitalize())
|
|
|
|
self.url = 'http://%s.petitesymphony.com/' % name
|
|
|
|
self.stripUrl = self.url + 'comic/%s'
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def getmodules(cls):
|
2016-10-31 06:16:10 +00:00
|
|
|
return (
|
2020-04-19 08:50:00 +00:00
|
|
|
cls('knuckleup'),
|
|
|
|
cls('sangria'),
|
2016-10-31 06:16:10 +00:00
|
|
|
)
|
2016-05-20 23:18:42 +00:00
|
|
|
|
|
|
|
|
2022-06-06 10:08:32 +00:00
|
|
|
class ComicsBreak(WordPressScraper):
|
2020-04-19 08:50:00 +00:00
|
|
|
def __init__(self, name, archive=None, adult=False):
|
2016-05-20 23:18:42 +00:00
|
|
|
super(ComicsBreak, self).__init__('ComicsBreak/' + name)
|
|
|
|
self.url = 'http://%s.comicsbreak.com/' % name.lower()
|
2020-01-09 02:05:05 +00:00
|
|
|
if archive:
|
|
|
|
self.url = 'https://web.archive.org/web/{}/{}'.format(
|
|
|
|
archive, self.url)
|
2019-12-26 05:34:04 +00:00
|
|
|
self.endOfLife = True
|
2020-04-19 08:50:00 +00:00
|
|
|
if adult:
|
|
|
|
self.adult = adult
|
2019-12-26 05:34:04 +00:00
|
|
|
|
|
|
|
def namer(self, imageUrl, pageUrl):
|
|
|
|
if self.name == 'ComicsBreak/Djandora':
|
|
|
|
# Fix inconsistent filenames
|
|
|
|
filename = imageUrl.rsplit('/', 1)[-1]
|
|
|
|
filename = filename.replace('2014-10-31-Page70', 'Page70')
|
|
|
|
filename = filename.replace('a3p69eng', 'Page69')
|
|
|
|
if '2015/08/a4p57eng' in imageUrl:
|
|
|
|
filename = filename.replace('p57', 'p56')
|
|
|
|
return filename
|
|
|
|
else:
|
|
|
|
return super(ComicsBreak, self).namer(imageUrl, pageUrl)
|
2012-12-12 16:41:29 +00:00
|
|
|
|
2016-05-20 23:18:42 +00:00
|
|
|
@classmethod
|
|
|
|
def getmodules(cls):
|
2016-10-31 06:16:10 +00:00
|
|
|
return (
|
2020-01-09 02:05:05 +00:00
|
|
|
cls('Djandora', archive='20170923062433'),
|
2020-04-19 08:50:00 +00:00
|
|
|
cls('Generation17', adult=True),
|
2016-10-31 06:16:10 +00:00
|
|
|
)
|