From a6cf4e70406db2e78883ebce362e86d5599237b6 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Mon, 16 May 2016 23:16:29 +0200 Subject: [PATCH] Fix some more comic modules. --- dosagelib/plugins/b.py | 13 --------- dosagelib/plugins/d.py | 4 +-- dosagelib/plugins/e.py | 29 +++++--------------- dosagelib/plugins/f.py | 4 +-- dosagelib/plugins/l.py | 8 +++--- dosagelib/plugins/o.py | 1 + dosagelib/plugins/p.py | 24 +++++++---------- dosagelib/plugins/t.py | 2 +- dosagelib/plugins/w.py | 60 +++++++++++------------------------------- dosagelib/plugins/z.py | 21 +++++---------- 10 files changed, 50 insertions(+), 116 deletions(-) diff --git a/dosagelib/plugins/b.py b/dosagelib/plugins/b.py index b212f3250..dcf1310cf 100644 --- a/dosagelib/plugins/b.py +++ b/dosagelib/plugins/b.py @@ -186,19 +186,6 @@ class BoredAndEvil(_BasicScraper): help = 'Index format: yyyy-mm-dd' -class BoyOnAStickAndSlither(_BasicScraper): - url = 'http://www.boasas.com/' - stripUrl = url + 'page/%s' - firstStripUrl = stripUrl % '2' - imageSearch = compile(tagre("img", "src", r'(http://\d+\.media\.tumblr\.com/[^"]+_1280\.png)')) - prevSearch = compile(tagre("a", "href", r'(/page/\d+)') + - "Next page") - help = 'Index format: n (unpadded)' - - def namer(self, image_url, page_url): - return page_url.rsplit('/')[-1] - - class BratHalla(_WordPressScraper): url = 'http://brat-halla.com/' diff --git a/dosagelib/plugins/d.py b/dosagelib/plugins/d.py index dedad5b4d..b0a4f0e54 100644 --- a/dosagelib/plugins/d.py +++ b/dosagelib/plugins/d.py @@ -126,8 +126,8 @@ class DieselSweeties(_ParserScraper): firstStripUrl = stripUrl % '1' imageSearch = '//img[@class="xomic"]' prevSearch = '//div[@id="prev"]//a[contains(text(), "previous")]' - nextSearch = '//div[@id="prev"]//a[contains(text(), "next")]' - starter = bounceStarter + latestSearch = prevSearch + starter = indirectStarter help = 'Index format: n (unpadded)' diff --git a/dosagelib/plugins/e.py b/dosagelib/plugins/e.py index 6ab51a9f6..9fced1df6 100644 --- a/dosagelib/plugins/e.py +++ b/dosagelib/plugins/e.py @@ -46,19 +46,13 @@ class EasilyAmused(_WordPressScraper): starter = indirectStarter -class EatLiver(_BasicScraper): +class EatLiver(_ParserScraper): url = 'http://www.eatliver.com/' - rurl = escape(url) starter = indirectStarter - stripUrl = url + "i.php?n=%s" - firstStripUrl = stripUrl % '1' - imageSearch = compile(tagre("link", "href", r'(%simg/\d+/[^"]+)' % rurl, - before="image_src")) - prevSearch = compile(tagre("a", "href", r'(i\.php\?n=\d+)') + - "<< Previous") - latestSearch = compile(tagre("a", "href", r'(i\.php\?n=\d+)') + - tagre("img", "src", r'img/small/[^"]+') + - r"\s*]+?>Previous') - help = 'Index format: stripname' + firstStripUrl = url + 'comic/09092001/' class WastedTalent(_BasicScraper): @@ -33,15 +28,6 @@ class WastedTalent(_BasicScraper): help = 'Index format: stripname' -class WayfarersMoon(_BasicScraper): - url = 'http://www.wayfarersmoon.com/' - stripUrl = url + 'index.php?page=%s' - firstStripUrl = stripUrl % '0' - imageSearch = compile(r'