Unify RickGriffinStudios comics
This commit is contained in:
parent
84a1aa8fd9
commit
d061852cc8
5 changed files with 62 additions and 47 deletions
|
@ -106,27 +106,6 @@ class AGirlAndHerFed(_ParserScraper):
|
|||
help = 'Index format: nnn'
|
||||
|
||||
|
||||
class AHClub(_WPNaviIn):
|
||||
baseUrl = 'http://rickgriffinstudios.com/'
|
||||
url = baseUrl + 'ah-club/'
|
||||
stripUrl = baseUrl + 'comic-post/%s/'
|
||||
firstStripUrl = stripUrl % 'cover'
|
||||
latestSearch = '//a[contains(@title, "Permanent Link")]'
|
||||
starter = indirectStarter
|
||||
nav = {
|
||||
'ah-club-2-cover': 'ah-club-1-page-24',
|
||||
'ah-club-3-cover': 'ah-club-2-page-28',
|
||||
'ah-club-4-cover': 'ah-club-3-page-22',
|
||||
}
|
||||
|
||||
def getPrevUrl(self, url, data):
|
||||
# Links between chapters
|
||||
url = url.rstrip('/').rsplit('/', 1)[-1]
|
||||
if self.nav and url in self.nav:
|
||||
return self.stripUrl % self.nav[url]
|
||||
return super(AHClub, self).getPrevUrl(url, data)
|
||||
|
||||
|
||||
class AhoiPolloi(_ParserScraper):
|
||||
url = 'https://ahoipolloi.blogger.de/'
|
||||
stripUrl = url + '?day=%s'
|
||||
|
|
|
@ -116,12 +116,6 @@ class HijinksEnsuePhoto(_WPNaviIn):
|
|||
endOfLife = True
|
||||
|
||||
|
||||
class Housepets(_WordPressScraper):
|
||||
url = 'http://www.housepetscomic.com/'
|
||||
stripUrl = url + 'comic/%s/'
|
||||
firstStripUrl = '2008/06/02/when-boredom-strikes'
|
||||
|
||||
|
||||
class HowToBeAWerewolf(_ComicControlScraper):
|
||||
url = 'http://howtobeawerewolf.com/'
|
||||
stripUrl = url + 'comic/%s'
|
||||
|
|
|
@ -1611,6 +1611,7 @@ class Renamed(Scraper):
|
|||
cls('ZebraGirl', 'ComicFury/ZebraGirl'),
|
||||
|
||||
# Renamed in 3.0
|
||||
cls('AHClub', 'RickGriffinStudios/AHClub'),
|
||||
cls('CrapIDrewOnMyLunchBreak', 'WebToons/CrapIDrewOnMyLunchBreak'),
|
||||
cls('DeerMe', 'ComicFury/DeerMe'),
|
||||
cls('GoComics/BloomCounty2017', 'GoComics/BloomCounty2019'),
|
||||
|
@ -1627,4 +1628,6 @@ class Renamed(Scraper):
|
|||
cls('SmackJeeves/GrowingTroubles', 'ComicFury/GrowingTroubles'),
|
||||
cls('SmackJeeves/TheRealmOfKaerwyn', 'ComicFury/TheRealmOfKaerwyn'),
|
||||
cls('StudioKhimera/Draconia', 'Draconia'),
|
||||
cls('TracesOfThePast', 'RickGriffinStudios/TracesOfThePast'),
|
||||
cls('TracesOfThePast/NSFW', 'RickGriffinStudios/TracesOfThePastNSFW'),
|
||||
)
|
||||
|
|
59
dosagelib/plugins/rickgriffinstudios.py
Normal file
59
dosagelib/plugins/rickgriffinstudios.py
Normal file
|
@ -0,0 +1,59 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
# Copyright (C) 2019-2020 Tobias Gruetzmacher
|
||||
# Copyright (C) 2019-2022 Daniel Ring
|
||||
from ..helpers import indirectStarter
|
||||
from .common import _WordPressScraper, _WPNaviIn
|
||||
|
||||
|
||||
class Housepets(_WordPressScraper):
|
||||
url = 'http://www.housepetscomic.com/'
|
||||
stripUrl = url + 'comic/%s/'
|
||||
firstStripUrl = '2008/06/02/when-boredom-strikes'
|
||||
|
||||
|
||||
class RickGriffinStudios(_WPNaviIn):
|
||||
baseUrl = 'http://rickgriffinstudios.com/'
|
||||
stripUrl = baseUrl + 'comic-post/%s/'
|
||||
latestSearch = '//a[contains(@title, "Permanent Link")]'
|
||||
starter = indirectStarter
|
||||
nav = None
|
||||
|
||||
def __init__(self, name, sub, first, last=None, adult=False, nav=None):
|
||||
super().__init__('RickGriffinStudios/' + name)
|
||||
self.url = self.baseUrl + sub + '/'
|
||||
self.firstStripUrl = self.stripUrl % first
|
||||
|
||||
if last:
|
||||
self.url = self.stripUrl % last
|
||||
self.starter = super(RickGriffinStudios, self).starter
|
||||
self.endOfLife = True
|
||||
|
||||
if adult:
|
||||
self.latestSearch = '//a[contains(@title, "NSFW")]'
|
||||
self.adult = True
|
||||
|
||||
if nav:
|
||||
self.nav = nav
|
||||
|
||||
def getPrevUrl(self, url, data):
|
||||
# Links between chapters
|
||||
url = url.rstrip('/').rsplit('/', 1)[-1]
|
||||
if self.nav and url in self.nav:
|
||||
return self.stripUrl % self.nav[url]
|
||||
return super(RickGriffinStudios, self).getPrevUrl(url, data)
|
||||
|
||||
@classmethod
|
||||
def getmodules(cls):
|
||||
return (
|
||||
cls('AHClub', 'ah-club', 'cover', nav={
|
||||
'ah-club-2-cover': 'ah-club-1-page-24',
|
||||
'ah-club-3-cover': 'ah-club-2-page-28',
|
||||
'ah-club-4-cover': 'ah-club-3-page-22',
|
||||
'ah-club-5-cover': 'ah-club-4-page-24'
|
||||
}),
|
||||
cls('HayvenCelestia', 'hayven-celestia', 'skinchange-p1'),
|
||||
cls('TheStoryboard', 'the-storyboard', 'the-storyboard-001'),
|
||||
cls('TracesOfThePast', 'in-the-new-age', 'totp-page-1'),
|
||||
cls('TracesOfThePastNSFW', 'in-the-new-age', 'totp-page-1-nsfw', adult=True),
|
||||
cls('ZootopiaNightTerrors', 'zootopia-night-terrors', 'zootopia-night-terrors-p1', 'zootopia-night-terrors-p7'),
|
||||
)
|
|
@ -290,26 +290,6 @@ class ToonHole(_WordPressScraper):
|
|||
return url in (self.url + "comic/if-game-of-thrones-was-animated/",)
|
||||
|
||||
|
||||
class TracesOfThePast(_WPNaviIn):
|
||||
baseUrl = 'http://rickgriffinstudios.com/'
|
||||
url = baseUrl + 'in-the-new-age/'
|
||||
stripUrl = baseUrl + 'comic-post/%s/'
|
||||
firstStripUrl = stripUrl % 'totp-page-1'
|
||||
latestSearch = '//a[contains(@title, "Permanent Link")]'
|
||||
starter = indirectStarter
|
||||
|
||||
|
||||
class TracesOfThePastNSFW(_WPNaviIn):
|
||||
name = 'TracesOfThePast/NSFW'
|
||||
baseUrl = 'http://rickgriffinstudios.com/'
|
||||
url = baseUrl + 'in-the-new-age/'
|
||||
stripUrl = baseUrl + 'comic-post/%s/'
|
||||
firstStripUrl = stripUrl % 'totp-page-1-nsfw'
|
||||
latestSearch = '//a[contains(@title, "NSFW")]'
|
||||
starter = indirectStarter
|
||||
adult = True
|
||||
|
||||
|
||||
class TrippingOverYou(_BasicScraper):
|
||||
url = 'http://www.trippingoveryou.com/'
|
||||
stripUrl = url + 'comic/%s'
|
||||
|
|
Loading…
Reference in a new issue