From dc41c318e9ee6ac09947328769fb9153e1c47998 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Tue, 29 Sep 2020 23:04:56 +0200 Subject: [PATCH] Fix ButterSafe --- dosagelib/plugins/b.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dosagelib/plugins/b.py b/dosagelib/plugins/b.py index 6daabd4f7..9409d164c 100644 --- a/dosagelib/plugins/b.py +++ b/dosagelib/plugins/b.py @@ -309,12 +309,10 @@ class ButternutSquash(_BasicScraper): help = 'Index format: yyyy/mm/dd/strip-name-author-name' -class ButterSafe(_BasicScraper): - url = 'http://buttersafe.com/' - rurl = escape(url) +class ButterSafe(_ParserScraper): + url = 'https://www.buttersafe.com/' stripUrl = url + '%s/' firstStripUrl = stripUrl % '2007/04/03/breakfast-sad-turtle' - imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl)) - prevSearch = compile(tagre("a", "href", r'(%s\d+\d+/\d+/\d+/[^"]+)' % rurl, - after="prev")) + imageSearch = '//div[@id="comic"]/img' + prevSearch = '//a[@rel="prev"]' help = 'Index format: yyyy/mm/dd/stripname'