Fix AntiheroForHire

This commit is contained in:
Techwolf 2020-04-29 01:39:17 -07:00
parent 9b69eaf4ff
commit cac269e0bc

View file

@ -352,20 +352,17 @@ class AntiheroForHire(_ParserScraper):
imageSearch = '//div[@class="image-wrapper"]//img[not(@class="thumb-image")]' imageSearch = '//div[@class="image-wrapper"]//img[not(@class="thumb-image")]'
multipleImagesPerStrip = True multipleImagesPerStrip = True
endOfLife = True endOfLife = True
archive = []
def starter(self): def starter(self):
# Build list of chapters for navigation # Build list of chapters for navigation
page = self.getPage(self.url) page = self.getPage(self.url)
archiveLinks = page.xpath('//ul[@class="archive-group-list"]//a[contains(@class, "archive-item-link")]') self.chapters = page.xpath('//ul[@class="archive-group-list"]//a[contains(@class, "archive-item-link")]/@href')
for link in archiveLinks: return self.chapters[0]
self.archive.append(link.get('href'))
return self.archive[0]
def getPrevUrl(self, url, data): def getPrevUrl(self, url, data):
# Retrieve previous chapter from list # Retrieve previous chapter from list
index = self.archive.index(url) + 1 index = self.chapters.index(url) + 1
return self.archive[index] if index < len(self.archive) else None return self.chapters[index] if index < len(self.chapters) else None
class AppleGeeks(_BasicScraper): class AppleGeeks(_BasicScraper):