Fix xkcd (closes #3), remove adult tag (fixes wummel#85).

This commit is contained in:
Tobias Gruetzmacher 2015-04-12 20:06:34 +02:00
parent 19ec8f4dbe
commit 974752951b

View file

@ -14,12 +14,11 @@ class xkcd(_BasicScraper):
starter = bounceStarter(url, compile(tagre("a", "href", r'(/\d+/)', before="next")))
stripUrl = url + '%s/'
firstStripUrl = stripUrl % '1'
imageSearch = compile(tagre("img", "src", r'(http://imgs\.xkcd\.com/comics/[^"]+)'))
imageSearch = compile(tagre("img", "src", r'(//imgs\.xkcd\.com/comics/[^"]+)'))
prevSearch = compile(tagre("a", "href", r'(/\d+/)', before="prev"))
help = 'Index format: n (unpadded)'
description = u'A webcomic of romance, sarcasm, math, and language.'
textSearch = compile(tagre("img", "title", r'([^"]+)', before=r'http://imgs\.xkcd\.com/comics/'))
adult = True
textSearch = compile(tagre("img", "title", r'([^"]+)', before=r'//imgs\.xkcd\.com/comics/'))
@classmethod
def namer(cls, imageUrl, pageUrl):