Switch SomethingPositive to parser (fixes #128)

This commit is contained in:
Tobias Gruetzmacher 2020-01-09 20:57:59 +01:00
parent 041d8be7ef
commit 18546c194a

View file

@ -322,16 +322,13 @@ class SodiumEyes(_WordPressScraper):
url = 'http://sodiumeyes.com/' url = 'http://sodiumeyes.com/'
class SomethingPositive(_BasicScraper): class SomethingPositive(_ParserScraper):
url = 'http://www.somethingpositive.net/' url = 'https://www.somethingpositive.net/'
stripUrl = url + 'sp%s.shtml' stripUrl = url + 'sp%s.shtml'
imageSearch = ( imageSearch = r'//img[re:test(@src, "/sp\d+")]'
compile(tagre("img", "src", r'(sp\d+\.png)')), prevSearch = ('//a[contains(text(), "Previous")]',
compile(tagre("img", "src", r'(twither\.gif)')), '//a[img[contains(@src, "previous")]]')
) multipleImagesPerStrip = True
prevSearch = compile(tagre("a", "href", r'(sp\d+\.shtml)') + "(?:" +
tagre("img", "src", r'images/previous\.gif') +
"|Previous)")
help = 'Index format: mmddyyyy' help = 'Index format: mmddyyyy'