From 1d94439715890ae499639f97d8b69477d3b93564 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Wed, 27 Apr 2016 00:31:27 +0200 Subject: [PATCH] Fix some more comic modules. --- dosagelib/plugins/b.py | 19 +++++++++---------- dosagelib/plugins/s.py | 30 ++++++++++++++++-------------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/dosagelib/plugins/b.py b/dosagelib/plugins/b.py index ac638140f..4feaa4f9a 100644 --- a/dosagelib/plugins/b.py +++ b/dosagelib/plugins/b.py @@ -24,12 +24,12 @@ class BadassMuthas(_BasicScraper): help = 'Index format: nnn' -class BadMachinery(_BasicScraper): +class BadMachinery(_ParserScraper): url = 'http://scarygoround.com/' stripUrl = url + '?date=%s' firstStripUrl = stripUrl % '20090918' - imageSearch = compile(tagre("img", "src", r'(strips/\d+[^"]+)')) - prevSearch = compile(tagre("a", "href", r'(\?date=\d+)') + 'Previous') + imageSearch = '//img[@class="comicimg"]' + prevSearch = '//a[contains(text(), "Previous")]' help = 'Index format: yyyymmdd' @@ -111,14 +111,13 @@ class BiggerThanCheeses(_BasicScraper): help = 'Index format: n (unpadded)' -class BillyTheDunce(_BasicScraper): +class BillyTheDunce(_ParserScraper): url = 'http://www.duncepress.com/' - rurl = escape(url) - stripUrl = url + '%s/' - firstStripUrl = stripUrl % '2009/06/an-introduction-of-sorts' - imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl)) - prevSearch = compile(r'