Switch BetterDays to parser scraper

This commit is contained in:
Techwolf 2019-06-12 19:22:15 -07:00 committed by Tobias Gruetzmacher
parent 5ca5da51fc
commit 016516e984

View file

@ -84,12 +84,13 @@ class Beetlebum(_BasicScraper):
return name return name
class BetterDays(_BasicScraper): class BetterDays(_ParserScraper):
url = 'http://jaynaylor.com/betterdays/' url = 'http://jaynaylor.com/betterdays/'
stripUrl = url + 'archives/%s.html' stripUrl = url + 'archives/%s.html'
firstStripUrl = stripUrl % '2003/04/post-2' firstStripUrl = stripUrl % '2003/04/post-2'
imageSearch = compile(tagre("img", "src", r'(/betterdays/comic/[^>]+)', quote="")) imageSearch = '//img[contains(@src, "/betterdays/comic/")]'
prevSearch = compile(tagre("a", "href", r'([^"]+)') + '« Previous') prevSearch = '//a[contains(text(), "Previous")]'
endOfLife = True
help = 'Index format: yyyy/mm/<your guess>' help = 'Index format: yyyy/mm/<your guess>'