Merge all Shivae Studio comics into one file

And they should all work again.
This commit is contained in:
Tobias Gruetzmacher 2021-02-02 00:41:08 +01:00
parent 667cd17830
commit 5508539ca8
4 changed files with 100 additions and 120 deletions

View file

@ -8,13 +8,7 @@ from re import compile, escape, MULTILINE
from ..util import tagre
from ..scraper import _BasicScraper, _ParserScraper
from ..helpers import regexNamer, bounceStarter, indirectStarter
from .common import _WordPressScraper, _WordPressSpliced, _WPNavi, _WPNaviIn, _WPWebcomic
class AbbysAgency(_WordPressSpliced):
url = 'https://abbysagency.us/'
stripUrl = url + 'blog/comic/%s/'
firstStripUrl = stripUrl % 'a'
from .common import _WordPressScraper, _WPNavi, _WPNaviIn, _WPWebcomic
class AbstruseGoose(_ParserScraper):
@ -169,29 +163,6 @@ class Alice(_WordPressScraper):
starter = indirectStarter
class AlienDice(_WordPressSpliced):
url = 'https://aliendice.com/'
stripUrl = url + 'comic/%s/'
firstStripUrl = stripUrl % '05162001'
def getPrevUrl(self, url, data):
# Fix broken navigation
if url == self.stripUrl % 'day-29-part-2-page-3-4':
return self.stripUrl % 'day-29-part-2-page-3-2'
return super(AlienDice, self).getPrevUrl(url, data)
def namer(self, imageUrl, pageUrl):
# Fix inconsistent filename
return imageUrl.rsplit('/', 1)[-1].replace('20010831', '2001-08-31')
class AlienDiceLegacy(_WordPressSpliced):
name = 'AlienDice/Legacy'
stripUrl = 'https://aliendice.com/comic/%s/'
url = stripUrl % 'legacy-2-15'
firstStripUrl = stripUrl % 'legacy-1'
class AlienLovesPredator(_BasicScraper):
url = 'http://alienlovespredator.com/'
stripUrl = url + '%s/'

View file

@ -1,90 +0,0 @@
# SPDX-License-Identifier: MIT
# Copyright (C) 2019-2020 Tobias Gruetzmacher
# Copyright (C) 2019-2020 Daniel Ring
from .common import _WordPressScraper
class TheCyantianChronicles(_WordPressScraper):
baseUrl = 'https://cyantian.net/'
stripUrl = baseUrl + 'comic/%s/'
def __init__(self, name, story, first, last=None, nav=None):
super(TheCyantianChronicles, self).__init__('TheCyantianChronicles/' + name)
self.url = self.baseUrl + 'story/' + story + '/'
self.firstStripUrl = self.stripUrl % first
self.nav = nav
if last:
self.url = self.stripUrl % last
self.endOfLife = True
def getPrevUrl(self, url, data):
# Missing/broken navigation links
url = url.rstrip('/').rsplit('/', 1)[-1]
if self.nav and url in self.nav:
return self.stripUrl % self.nav[url]
return super(TheCyantianChronicles, self).getPrevUrl(url, data)
@classmethod
def getmodules(cls):
return (
cls('Akaelae', 'akaelae', '05182003', last='01202010'),
cls('Artwork', 'artwork', '07162003', nav={'d-71': 'a-17'}),
cls('CampusSafari', 'ocs', '10012000', last='03282008'),
cls('CampusSafariReboot', 'campus-safari', 'campus-safari-chapter-0'),
cls('CesileesDiary', 'cdiary', '12062001-2', last='05312006'),
cls('CookieCaper', 'cookie-caper', 'cookie-war', last='2014-04-17'),
cls('Darius', 'dbook-01', '03102010', last='darius-end'),
cls('DracoVulpes', 'draco-vulpes', 'draco-vulpes'),
cls('GenoworksSaga', 'genoworks-saga', '07012004'),
cls('GralenCraggHall', 'gchall', '07152002', last='chapter-6-05',
nav={'chapter-5': '02152005'}),
cls('Kiet', 'kiet', 'kiet-c01'),
cls('NoAngel', 'no-angel', '08112001', last='12142006'),
cls('Pawprints', 'pawprints', 'airboard-page-1', last='pawprints-sheana-10'),
cls('RandomRamblings', 'random-ramblings', 'darrik'),
cls('SinkOrSwim', 'sos', 'sink-or-swim', last='ricochete-and-seraphim'),
)
class Shivae(_WordPressScraper):
url = 'https://shivae.com/'
stripUrl = url + 'gnip/%s/'
firstStripUrl = stripUrl % 'cler/09202001'
class ShivaeComics(_WordPressScraper):
baseUrl = 'https://shivae.net/'
def __init__(self, name, story, first, last=None, nav=None):
super(ShivaeComics, self).__init__('Shivae/' + name)
self.url = self.baseUrl + story + '/'
self.stripUrl = self.url + 'comic/%s/'
self.firstStripUrl = self.stripUrl % first
self.nav = nav
if last:
self.url = self.stripUrl % last
self.endOfLife = True
def getPrevUrl(self, url, data):
# Missing/broken navigation links
url = url.rstrip('/').rsplit('/', 1)[-1]
if self.nav and url in self.nav:
return self.stripUrl % self.nav[url]
return super(ShivaeComics, self).getPrevUrl(url, data)
@classmethod
def getmodules(cls):
return (
cls('BlackRose', 'blackrose', '11012004'),
cls('CafeAnime', 'cafeanime', '08172004', last='09192009'),
cls('Extras', 'extras', '01012012', nav={'12302012': '08152013'}),
cls('Pure', 'pure', '04082002', last='chapter-6-page-1'),
cls('SerinFairyHunter', 'serin', 'character-serin'),
cls('SivineBlades', 'sivine', '06302002', last='10242008'),
)

View file

@ -630,6 +630,8 @@ class Removed(Scraper):
cls('ComicFury/TheUnthinkableHybrid'),
cls('ComicFury/TwentyFourSeven'),
cls('ComicFury/TwentyFourSevenFans'),
cls('TheCyantianChronicles/CookieCaper'),
cls('TheCyantianChronicles/Pawprints'),
cls('GoComics/2CowsAndAChicken'),
cls('GoComics/AskAPortlySyndicatePerson'),
cls('GoComics/Bewley'),
@ -1265,6 +1267,8 @@ class Removed(Scraper):
cls('SmackJeeves/_A_'),
cls('SnafuComics/KOF'),
cls('SnafuComics/SF'),
cls('Shivae/CafeAnime'),
cls('Shivae/Extras'),
cls('SnafuComics/Titan'),
cls('StuffNoOneToldMe'),
cls('VictimsOfTheSystem'),
@ -1418,6 +1422,7 @@ class Renamed(Scraper):
cls('GoComics/PeanutsEnEspanol', 'GoComics/SnoopyEnEspanol'),
cls('GoComics/RipleysBelieveItOrNotSpanish', 'GoComics/RipleysAunqueUstedNoLoCrea'),
cls('GoComics/WebcomicName', 'WebcomicName'),
cls('Shivae/BlackRose', 'BlackRose'),
cls('SmackJeeves/BlackTapestries', 'ComicFury/BlackTapestries'),
cls('SmackJeeves/FurryExperience', 'ComicFury/FurryExperience'),
cls('SmackJeeves/GrowingTroubles', 'ComicFury/GrowingTroubles'),

View file

@ -0,0 +1,94 @@
# SPDX-License-Identifier: MIT
# Copyright (C) 2019-2021 Tobias Gruetzmacher
# Copyright (C) 2019-2020 Daniel Ring
from .common import _WordPressSpliced
class _WithSid(_WordPressSpliced):
def __init__(self, name, sid, eol=False):
super().__init__(name)
self.stripUrl = self.baseUrl + 'comic/%s/?sid={}'.format(sid)
class AbbysAgency(_WordPressSpliced):
url = 'https://abbysagency.us/'
stripUrl = url + 'blog/comic/%s/'
firstStripUrl = stripUrl % 'a'
class AlienDice(_WordPressSpliced):
url = 'https://aliendice.com/'
stripUrl = url + 'comic/%s/'
firstStripUrl = stripUrl % '05162001'
def namer(self, imageUrl, pageUrl):
# Fix inconsistent filename
return imageUrl.rsplit('/', 1)[-1].replace('20010831', '2001-08-31')
class AlienDiceLegacy(_WordPressSpliced):
name = 'AlienDice/Legacy'
url = 'https://aliendice.com/chapter/legacy/'
stripUrl = url + 'page/%s/'
firstStripUrl = stripUrl % '45'
prevSearch = '//div[d:class("nav-previous")]/a'
endOfLife = True
class BlackRose(_WordPressSpliced):
url = 'https://www.blackrose.monster/'
stripUrl = url + 'comic/%s/'
firstStripUrl = stripUrl % '2004-11-01'
class TheCyantianChronicles(_WithSid):
baseUrl = 'https://cyantian.net/'
def __init__(self, name, path, first, sid, eol=False):
super().__init__('TheCyantianChronicles/' + name, sid)
self.url = self.baseUrl + 'series/' + path + '/'
self.firstStripUrl = self.stripUrl % first
self.endOfLife = eol
@classmethod
def getmodules(cls):
return (
cls('Akaelae', 'akaelae', '05182003', 15043, eol=True),
cls('Artwork', 'art-gallery', '07162003', 15102),
cls('CampusSafari', 'original-campus-safari', '10012000', 13804, eol=True),
cls('CampusSafariReboot', 'campus-safari', 'campus-safari-chapter-0', 13790),
cls('CesileesDiary', 'cesilees-diary', '12062001-2', 16726, eol=True),
cls('Darius', 'darius', '03102010', 14353, eol=True),
cls('DracoVulpes', 'draco-vulpes', 'draco-vulpes', 13788),
cls('GenoworksSaga', 'genoworks-saga', '07012004', 13794, eol=True),
cls('GralenCraggHall', 'kiet', '07152002', 13798, eol=True),
cls('Kiet', 'kiet-2', 'kiet-c01', 14351, eol=True),
cls('NoAngel', 'no-angel', '08112001', 16644, eol=True),
cls('RandomRamblings', 'gallery', 'cookie-war', 13801),
cls('SinkOrSwim', 'sink-or-swim', '05112001', 13796, eol=True),
cls('VincentAndFilaire', 'vincent-and-filaire', 'vincent-and-filaire', 13792),
)
class Shivae(_WordPressSpliced):
url = 'https://shivae.com/'
stripUrl = url + 'comic/%s/'
firstStripUrl = stripUrl % '09202001'
class ShivaeComics(_WithSid):
baseUrl = 'https://shivae.net/index.php/'
def __init__(self, name, path, first, sid, eol=False):
super().__init__('Shivae/' + name, sid)
self.url = self.baseUrl + 'series/' + path + '/'
self.firstStripUrl = self.stripUrl % first
self.endOfLife = eol
@classmethod
def getmodules(cls):
return (
cls('Pure', 'pure-2', '2002-02-27', 1328, eol=True),
cls('SerinFairyHunter', 'pure', 'character-serin', 1289),
cls('SivineBlades', 'sivine-blades', '2002-06-30', 1326, eol=True),
)