From d732767e02ef0b74b1250216ef6f679421c91c5b Mon Sep 17 00:00:00 2001 From: Techwolf Date: Tue, 16 Jul 2019 23:11:27 -0700 Subject: [PATCH] Fix Freefall --- dosagelib/plugins/f.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/dosagelib/plugins/f.py b/dosagelib/plugins/f.py index 73823f65f..7b84a5e03 100644 --- a/dosagelib/plugins/f.py +++ b/dosagelib/plugins/f.py @@ -157,12 +157,20 @@ class FredoAndPidjin(_ParserScraper): namer = joinPathPartsNamer((0, 1, 2)) -class Freefall(_BasicScraper): - url = 'http://freefall.purrsia.com/default.htm' - stripUrl = 'http://freefall.purrsia.com/ff%s/fc%s.htm' - imageSearch = compile(r'Previous') - help = 'Index format: nnnn/nnnnn' +class Freefall(_ParserScraper): + url = 'http://freefall.purrsia.com/' + stripUrl = url + 'ff%d/%s%05d.htm' + firstStripUrl = stripUrl % (100, 'fv', 1) + imageSearch = '//img[contains(@src, "/ff")]' + prevSearch = '//a[text()="Previous"]' + multipleImagesPerStrip = True + + def getIndexStripUrl(self, index): + # Get comic strip URL from index + index = int(index) + chapter = index + 100 - (index % 100) + color = 'fc' if index > 1252 else 'fv' + return self.stripUrl % (chapter, color, index) class FreighterTails(_ParserScraper):