From 7e9ca4dabab8ff2fef1598efdaee0af9a6ac047f Mon Sep 17 00:00:00 2001 From: Techwolf Date: Sat, 3 Aug 2019 00:10:29 -0700 Subject: [PATCH] Add AntiheroForHire --- dosagelib/plugins/a.py | 23 +++++++++++++++++++++++ dosagelib/plugins/old.py | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/dosagelib/plugins/a.py b/dosagelib/plugins/a.py index d46e58cff..cece6db5f 100644 --- a/dosagelib/plugins/a.py +++ b/dosagelib/plugins/a.py @@ -356,6 +356,29 @@ class ApartmentForTwo(_ParserScraper): help = 'Index format: yyyymmdd' +class AntiheroForHire(_ParserScraper): + stripUrl = 'https://www.giantrobot.club/antihero-for-hire/%s' + firstStripUrl = stripUrl % '2016/6/8/entrance-vigil' + url = firstStripUrl + imageSearch = '//div[@class="image-wrapper"]//img[not(@class="thumb-image")]' + multipleImagesPerStrip = True + endOfLife = True + archive = [] + + def starter(self): + # Build list of chapters for navigation + page = self.getPage(self.url) + archiveLinks = page.xpath('//ul[@class="archive-group-list"]//a[contains(@class, "archive-item-link")]') + for link in archiveLinks: + self.archive.append(link.get('href')) + return self.archive[0] + + def getPrevUrl(self, url, data): + # Retrieve previous chapter from list + index = self.archive.index(url) + 1 + return self.archive[index] if index < len(self.archive) else None + + class AppleGeeks(_BasicScraper): url = 'http://www.applegeeks.com/' stripUrl = url + 'comics/viewcomic.php?issue=%s' diff --git a/dosagelib/plugins/old.py b/dosagelib/plugins/old.py index b29da5497..b8a3889ce 100644 --- a/dosagelib/plugins/old.py +++ b/dosagelib/plugins/old.py @@ -383,7 +383,6 @@ class Removed(Scraper): cls('HorribleVille'), cls('KatzenfutterGeleespritzer'), cls('KeenSpot/Adventurers', 'mov'), - cls('KeenSpot/AntiheroForHire', 'mov'), cls('Key'), cls('KillerKomics'), cls('Kukuburi'), @@ -655,6 +654,7 @@ class Renamed(Scraper): cls('GoComics/WhiskeyFalls', 'ComicSherpa/WhiskeyFalls'), cls('GoComics/Wrobbertcartoons', 'ComicSherpa/WrobbertCartoons'), cls('GoComics/Zootopia', 'ComicSherpa/Zootopia'), + cls('KeenSpot/AntiheroForHire', 'AntiheroForHire'), cls('KeenSpot/ElGoonishShive', 'ElGoonishShive'), cls('KeenSpot/ElGoonishShiveNP', 'ElGoonishShiveNP'), cls('KeenSpot/Newshounds', 'KeenSpot/InfinityRefugees'),