diff --git a/dosagelib/plugins/h.py b/dosagelib/plugins/h.py index 979235e1f..8f145e0b5 100644 --- a/dosagelib/plugins/h.py +++ b/dosagelib/plugins/h.py @@ -2,7 +2,7 @@ # Copyright (C) 2012-2014 Bastian Kleineidam from re import compile, escape -from ..scraper import _BasicScraper +from ..scraper import _BasicScraper, _ParserScraper from ..util import tagre from ..helpers import bounceStarter @@ -58,14 +58,13 @@ class HijinksEnsue(_BasicScraper): help = 'Index format: yyyy/mm/dd/stripname' -class Hipsters(_BasicScraper): +class Hipsters(_ParserScraper): url = 'http://www.hipsters-comic.com/' - rurl = escape(url) - stripUrl = url + '%s/' - firstStripUrl = stripUrl % '2010/08/hip01' - imageSearch = compile(tagre("img", "src", r'(%scomics/\d+-\d+-\d+[^"]+)' % rurl)) - prevSearch = compile(tagre("a", "href", r'(%s\d+/\d+/[^"]+)' % rurl, after="prev")) - help = 'Index format: yyyy/dd/stripname' + stripUrl = url + 'comic/%s/' + firstStripUrl = stripUrl % 'hip01' + imageSearch = '//div[@id="comic"]//img', + prevSearch = '//a[contains(text()," Prev")]', + help = 'Index format: stripname' class HorribleVille(_BasicScraper):