Fix Dilbert (fixes #44).
This commit is contained in:
parent
e9b3c487c0
commit
b9d9564085
1 changed files with 4 additions and 6 deletions
|
@ -148,16 +148,14 @@ class DieselSweetiesOld(_ParserScraper):
|
||||||
return 'sw%02d' % index
|
return 'sw%02d' % index
|
||||||
|
|
||||||
|
|
||||||
class Dilbert(_BasicScraper):
|
class Dilbert(_ParserScraper):
|
||||||
url = 'http://dilbert.com/'
|
url = 'http://dilbert.com/'
|
||||||
stripUrl = url + 'strip/%s'
|
stripUrl = url + 'strip/%s'
|
||||||
firstStripUrl = stripUrl % '1989-04-16'
|
firstStripUrl = stripUrl % '1989-04-16'
|
||||||
starter = indirectStarter
|
starter = indirectStarter
|
||||||
prevSearch = compile(tagre("a", "href", r'(/strip/\d+-\d+-\d+)', after="Older Strip"))
|
prevSearch = '//div[%s]/a' % xpath_class('nav-left')
|
||||||
imageSearch = compile(tagre("img", "src", r'(http://assets.amuniversal.com/\w+)'))
|
imageSearch = '//img[%s]' % xpath_class('img-comic')
|
||||||
latestSearch = compile(tagre("a", "href",
|
latestSearch = '//a[@class="img-comic-link"]'
|
||||||
r'(http://dilbert.com/strip/[0-9-]*)',
|
|
||||||
after="Click to see"))
|
|
||||||
help = 'Index format: yyyy-mm-dd'
|
help = 'Index format: yyyy-mm-dd'
|
||||||
|
|
||||||
def namer(self, image_url, page_url):
|
def namer(self, image_url, page_url):
|
||||||
|
|
Loading…
Reference in a new issue