From 6e138a022841a23dfb0a013389d0983fb1aa6daf Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Tue, 14 May 2024 22:47:33 +0200 Subject: [PATCH] Fix Drive (fixes #318) --- dosagelib/plugins/d.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/dosagelib/plugins/d.py b/dosagelib/plugins/d.py index 3bfa0cf7c..4b632cac9 100644 --- a/dosagelib/plugins/d.py +++ b/dosagelib/plugins/d.py @@ -350,14 +350,12 @@ class DrFun(_ParserScraper): help = 'Index format: nnnnn' -class Drive(_BasicScraper): +class Drive(ParserScraper): url = 'http://www.drivecomic.com/' - rurl = escape(url) - stripUrl = url + 'archive/%s.html' - firstStripUrl = stripUrl % '090815' - imageSearch = compile(tagre("img", "src", r'(http://cdn\.drivecomic\.com/strips/main/[^"]+)')) - prevSearch = compile(tagre("a", "href", r'(%sarchive/\d+\.html)' % rurl) + "Previous") - help = 'Index format: yymmdd' + firstStripUrl = url + 'comic/act-1-pg-001/' + imageSearch = ('//div[@id="unspliced-comic"]//img/@data-src-img', + '//div[@id="unspliced-comic"]//picture//img') + prevSearch = '//a[d:class("previous-comic")]' class DrMcNinja(_ParserScraper):