fixing PandyLand
This commit is contained in:
parent
fd60065591
commit
a05ae9c75d
2 changed files with 14 additions and 22 deletions
|
@ -1,20 +1,22 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from ..scraper import make_scraper, _ParserScraper
|
||||
|
||||
def add(name, url, firstUrl=None, lang=None):
|
||||
|
||||
attrs = dict(
|
||||
name = name,
|
||||
url = url,
|
||||
imageSearch = '//div[@id="comic"]//img',
|
||||
prevSearch = u'//a[contains(text(), " Prev")]',
|
||||
)
|
||||
if lang:
|
||||
attrs['lang'] = lang
|
||||
if firstUrl:
|
||||
attrs['firstUrl'] = url + firstUrl
|
||||
globals()[name] = make_scraper(name, _ParserScraper, **attrs)
|
||||
def add(name, url, firstUrl=None, lang=None):
|
||||
attrs = dict(
|
||||
name=name,
|
||||
url=url,
|
||||
imageSearch='//div[@id="comic"]//img',
|
||||
prevSearch=['//a[contains(text(), " Prev")]', "//a[contains(concat(' ', @class, ' '), ' navi-prev ')]"]
|
||||
)
|
||||
if lang:
|
||||
attrs['lang'] = lang
|
||||
if firstUrl:
|
||||
attrs['firstUrl'] = url + firstUrl
|
||||
globals()[name] = make_scraper(name, _ParserScraper, **attrs)
|
||||
|
||||
|
||||
add('CourtingDisaster', 'http://www.courting-disaster.com/', 'comic/courting-disaster-17/')
|
||||
add('OnTheEdge', 'http://ontheedgecomics.com/', 'comic/ote0001/')
|
||||
add('PandyLand', 'http://pandyland.net/', '1/')
|
||||
add('Hipsters', 'http://www.hipsters-comic.com/', 'comic/hip01/')
|
|
@ -8,16 +8,6 @@ from ..helpers import bounceStarter, queryNamer, indirectStarter
|
|||
from ..util import tagre
|
||||
|
||||
|
||||
class PandyLand(_BasicScraper):
|
||||
url = 'http://pandyland.net/'
|
||||
rurl = escape(url)
|
||||
stripUrl = url + '%s/'
|
||||
firstStripUrl = stripUrl % '1'
|
||||
imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
|
||||
prevSearch = compile(tagre("a", "href", r'(%s\d+/)' % rurl, after="prev"))
|
||||
help = 'Index format: number'
|
||||
|
||||
|
||||
class ParadigmShift(_BasicScraper):
|
||||
url = 'http://www.paradigmshiftmanga.com/'
|
||||
starter = indirectStarter(url, compile(tagre("a", "href", r'([^"]+)', after="next-comic-link")))
|
||||
|
|
Loading…
Reference in a new issue