From 88e54258d0d274a7030d908bcff396e1f6dead5c Mon Sep 17 00:00:00 2001 From: Techwolf Date: Thu, 25 Jun 2020 00:28:33 -0700 Subject: [PATCH] Fix StudioKhimera/UberQuest --- dosagelib/plugins/studiokhimera.py | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/dosagelib/plugins/studiokhimera.py b/dosagelib/plugins/studiokhimera.py index 62015cf71..267a578f4 100644 --- a/dosagelib/plugins/studiokhimera.py +++ b/dosagelib/plugins/studiokhimera.py @@ -2,6 +2,7 @@ # Copyright (C) 2019-2020 Tobias Gruetzmacher # Copyright (C) 2019-2020 Daniel Ring from ..scraper import _ParserScraper +from .common import _WordPressScraper class StudioKhimera(_ParserScraper): @@ -39,20 +40,25 @@ class StudioKhimera(_ParserScraper): return None return self.chapters[index - 1] - def namer(self, imageUrl, pageUrl): - # Fix inconsistent filenames - filename = imageUrl.rsplit('/', 1)[-1] - if 'uberquest' in pageUrl: - filename = filename.replace('Page', 'UberQuest') - filename = filename.replace('UberQuest01.', 'UberQuest001.') - filename = filename.replace('UberQuest98.', 'UberQuest098.') - filename = filename.replace('UberQuest99.', 'UberQuest099.') - return filename - @classmethod def getmodules(cls): return ( cls('Eorah', 'eorah'), cls('Mousechievous', 'mousechievous'), - cls('UberQuest', 'uberquest'), ) + + +class UberQuest(_WordPressScraper): + name = 'StudioKhimera/UberQuest' + url = 'https://uberquest.studiokhimera.com/' + stripUrl = url + 'comic/%s/' + firstStripUrl = stripUrl % 'chapter-1-cover' + + def namer(self, imageUrl, pageUrl): + # Fix inconsistent filenames + filename = imageUrl.rsplit('/', 1)[-1] + filename = filename.replace('Page', 'UberQuest') + filename = filename.replace('UberQuest01.', 'UberQuest001.') + filename = filename.replace('UberQuest98.', 'UberQuest098.') + filename = filename.replace('UberQuest99.', 'UberQuest099.') + return filename