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