diff --git a/dosagelib/plugins/comicpress.py b/dosagelib/plugins/comicpress.py index ef60feb64..d25f1c50d 100644 --- a/dosagelib/plugins/comicpress.py +++ b/dosagelib/plugins/comicpress.py @@ -1,20 +1,22 @@ # -*- coding: utf-8 -*- from ..scraper import make_scraper, _ParserScraper -def add(name, url, firstUrl=None, lang=None): - attrs = dict( - name = name, - url = url, - imageSearch = '//div[@id="comic"]//img', - prevSearch = u'//a[contains(text(), " Prev")]', - ) - if lang: - attrs['lang'] = lang - if firstUrl: - attrs['firstUrl'] = url + firstUrl - globals()[name] = make_scraper(name, _ParserScraper, **attrs) +def add(name, url, firstUrl=None, lang=None): + attrs = dict( + name=name, + url=url, + imageSearch='//div[@id="comic"]//img', + prevSearch=['//a[contains(text(), " Prev")]', "//a[contains(concat(' ', @class, ' '), ' navi-prev ')]"] + ) + if lang: + attrs['lang'] = lang + if firstUrl: + attrs['firstUrl'] = url + firstUrl + globals()[name] = make_scraper(name, _ParserScraper, **attrs) + add('CourtingDisaster', 'http://www.courting-disaster.com/', 'comic/courting-disaster-17/') add('OnTheEdge', 'http://ontheedgecomics.com/', 'comic/ote0001/') +add('PandyLand', 'http://pandyland.net/', '1/') add('Hipsters', 'http://www.hipsters-comic.com/', 'comic/hip01/') \ No newline at end of file diff --git a/dosagelib/plugins/p.py b/dosagelib/plugins/p.py index 2be2d5e59..decc8d78e 100755 --- a/dosagelib/plugins/p.py +++ b/dosagelib/plugins/p.py @@ -8,16 +8,6 @@ from ..helpers import bounceStarter, queryNamer, indirectStarter from ..util import tagre -class PandyLand(_BasicScraper): - url = 'http://pandyland.net/' - rurl = escape(url) - stripUrl = url + '%s/' - firstStripUrl = stripUrl % '1' - imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl)) - prevSearch = compile(tagre("a", "href", r'(%s\d+/)' % rurl, after="prev")) - help = 'Index format: number' - - class ParadigmShift(_BasicScraper): url = 'http://www.paradigmshiftmanga.com/' starter = indirectStarter(url, compile(tagre("a", "href", r'([^"]+)', after="next-comic-link")))