From 2dbd3382f7e99451bc436a19ae3d089d9fb65796 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Fri, 15 Dec 2017 00:00:25 +0100 Subject: [PATCH] Update LeastICouldDo (fixes #99) --- dosagelib/plugins/l.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/dosagelib/plugins/l.py b/dosagelib/plugins/l.py index 44e5275c1..8ce6430f0 100644 --- a/dosagelib/plugins/l.py +++ b/dosagelib/plugins/l.py @@ -51,16 +51,13 @@ class LasLindas(_BasicScraper): help = 'Index format: stripname' -class LeastICouldDo(_BasicScraper): +class LeastICouldDo(_ParserScraper): url = 'http://www.leasticoulddo.com/' - rurl = escape(url) stripUrl = url + 'comic/%s' - firstStripUrl = stripUrl % '20130109' - imageSearch = compile(tagre("img", "src", r'(%swp-content/uploads/\d+/\d+/\d{8,9}\.\w{1,4})' % rurl)) - prevSearch = compile(tagre("a", "href", r'(%scomic/\d+/)' % rurl, - after="Previous")) - latestSearch = compile(tagre("a", "href", r'(%scomic/\d+/)' % rurl, - after="feature-comic")) + firstStripUrl = stripUrl % '20030210' + imageSearch = '//div[@id="content-comic"]//img' + prevSearch = '//a[@rel="prev"]' + latestSearch = '//a[@id="latest-comic"]' starter = indirectStarter help = 'Index format: yyyymmdd'