fixed OctopusPie

This commit is contained in:
Damjan Košir 2015-05-14 23:06:12 +12:00
parent 3bbf2d5c23
commit 962286d391

View file

@ -8,16 +8,13 @@ from ..helpers import indirectStarter
from ..util import tagre from ..util import tagre
class OctopusPie(_BasicScraper): class OctopusPie(_ParserScraper):
url = 'http://www.octopuspie.com/' url = 'http://www.octopuspie.com/'
rurl = escape(url) rurl = escape(url)
starter = indirectStarter(url,
compile(tagre("a", "href", r'(%s[^"]+)' % rurl) +
tagre("img", "src", r'%sjunk/latest\.png' % rurl)))
stripUrl = url + '%s/' stripUrl = url + '%s/'
firstStripUrl = stripUrl % '2007-05-14/001-pea-wiggle' firstStripUrl = stripUrl % '2007-05-14/001-pea-wiggle'
imageSearch = compile(tagre("img", "src", r'(%sstrippy/[^"]+)' % rurl)) imageSearch = '//img[@title]'
prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="prev")) prevSearch = '//a[@rel="prev"]'
help = 'Index format: yyyy-mm-dd/nnn-strip-name' help = 'Index format: yyyy-mm-dd/nnn-strip-name'