From 605c5f8619add9859f7ce4f414a699e2f6094a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damjan=20Ko=C5=A1ir?= Date: Tue, 26 May 2015 22:31:43 +1200 Subject: [PATCH] fixed PokeyThePenguin --- dosagelib/plugins/p.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dosagelib/plugins/p.py b/dosagelib/plugins/p.py index dba6c73c7..fb2dac5a7 100755 --- a/dosagelib/plugins/p.py +++ b/dosagelib/plugins/p.py @@ -181,17 +181,17 @@ class _PlanescapeSurvival(_BasicScraper): help = 'Index format: nnn' -class PokeyThePenguin(_BasicScraper): - baseUrl = 'http://www.yellow5.com/pokey/archive/' - url = baseUrl + 'index558.html' - stripUrl = baseUrl + 'index%s.html' +class PokeyThePenguin(_ParserScraper): + url = 'http://www.yellow5.com/pokey/archive/' + stripUrl = url + 'index%s.html' firstStripUrl = stripUrl % '1' - imageSearch = compile(tagre("img", "src", r'(pokey\d+[^"]+)')) + imageSearch = '//p/img' prevSearch = True multipleImagesPerStrip = True + starter = indirectStarter(url, "(//a)[last()]") help = 'Index format: number' - def getPrevUrl(self, url, data, baseUrl): + def getPrevUrl(self, url, data): """Decrease index.html number.""" mo = compile(r"index(\d+)\.html").search(url) num = int(mo.group(1)) - 1