From f49dff13be9789dcace2d1de0c7125d034e6d139 Mon Sep 17 00:00:00 2001 From: Techwolf Date: Tue, 10 Sep 2019 19:52:08 -0700 Subject: [PATCH] Move AddictiveScience to KemonoCafe --- dosagelib/plugins/kemonocafe.py | 6 ++++++ dosagelib/plugins/old.py | 1 + dosagelib/plugins/smackjeeves.py | 1 - 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dosagelib/plugins/kemonocafe.py b/dosagelib/plugins/kemonocafe.py index e4e37666b..e1bd748ec 100644 --- a/dosagelib/plugins/kemonocafe.py +++ b/dosagelib/plugins/kemonocafe.py @@ -38,11 +38,17 @@ class KemonoCafe(_ParserScraper): filename = filename.replace('89', '90') elif 'rascals' in pageUrl and '133-2' in pageUrl: filename = filename.replace('133', '134') + # Fix unordered filenames + if 'addictivescience' in pageUrl: + page = self.getPage(pageUrl) + num = int(page.xpath('//div[@id="comic-wrap"]/@class')[0].replace('comic-id-', '')) + filename = '%04d_%s' % (num, filename) return filename @classmethod def getmodules(cls): return ( + cls('AddictiveScience', 'addictivescience', 'page0001'), cls('CaribbeanBlue', 'cb', 'page000', last='page325'), cls('IMew', 'imew', 'imew00', last='imew50'), cls('Knighthood', 'knighthood', 'kh0001'), diff --git a/dosagelib/plugins/old.py b/dosagelib/plugins/old.py index 9f6d95e57..1446efb39 100644 --- a/dosagelib/plugins/old.py +++ b/dosagelib/plugins/old.py @@ -734,6 +734,7 @@ class Renamed(Scraper): cls('PetiteSymphony/Rascals', 'KemonoCafe/Rascals'), cls('QuentynQuinnSpaceRanger', 'RHJunior/QuentynQuinnSpaceRanger'), cls('ShermansLagoon', 'ComicsKingdom/ShermansLagoon'), + cls('SmackJeeves/AddictiveScience', 'KemonoCafe/AddictiveScience'), cls('SmackJeeves/CityFolk', 'ComicFury/CityFolk'), cls('SmackJeeves/DoomsdayMyDear', 'DoomsdayMyDear'), cls('SmackJeeves/ForestHill', 'ForestHill'), diff --git a/dosagelib/plugins/smackjeeves.py b/dosagelib/plugins/smackjeeves.py index 7b2a39e4e..e53e9a3e3 100644 --- a/dosagelib/plugins/smackjeeves.py +++ b/dosagelib/plugins/smackjeeves.py @@ -64,7 +64,6 @@ class SmackJeeves(_ParserScraper): cls('AceOfHearts', 155154), cls('AcidMonday', 30447, adult=True), cls('Adalsysla', 96496, endOfLife=True), - cls('AddictiveScience', 130684), cls('ADoodleADay', 141301), cls('AdventuresOfLumAndFriends', 122193), cls('AdventuresoftheWeird', 4430),