fixing Curvy

This commit is contained in:
Damjan Košir 2015-05-26 19:47:31 +12:00
parent 36c790fa4b
commit f8690af029

View file

@ -334,23 +334,13 @@ class Curtailed(_BasicScraper):
help = 'Index format: yyyy/mm/dd/stripname' help = 'Index format: yyyy/mm/dd/stripname'
class Curvy(_BasicScraper): class Curvy(_ParserScraper):
url = 'http://www.c.urvy.org/' url = 'http://www.c.urvy.org/'
stripUrl = url + '?date=%s' stripUrl = url + '?date=%s'
firstStripUrl = stripUrl % '20080329' firstStripUrl = stripUrl % '20080329'
imageSearch = compile(tagre("img", "src", r'(/c/[^"]+)')) imageSearch = '//div[@id="theActualComic"]//img'
prevSearch = compile(tagre("a", "href", r'(/\?date=\d+)') + prevSearch = '//div[@class="aNavbar"]//p[2]/a'
tagre("img", "src", "/nav/prev\.png"))
help = 'Index format: yyyymmdd' help = 'Index format: yyyymmdd'
starter = bounceStarter(url,
compile(tagre("a", "href", r'(/\?date=\d+)') +
tagre("img", "src", "/nav/next\.png")))
def shouldSkipUrl(self, url, data):
"""Skip pages without images."""
return url in (
self.stripUrl % '20130402',
)
class CyanideAndHappiness(_BasicScraper): class CyanideAndHappiness(_BasicScraper):