adding bonus panel to SWBC and multiple images flag to ParserScraper
This commit is contained in:
parent
f8a163a361
commit
fd9c480d9c
2 changed files with 4 additions and 11 deletions
|
@ -283,9 +283,11 @@ class SMBC(_ParserScraper):
|
||||||
rurl = escape(url)
|
rurl = escape(url)
|
||||||
stripUrl = url + '?id=%s'
|
stripUrl = url + '?id=%s'
|
||||||
firstStripUrl = stripUrl % '1'
|
firstStripUrl = stripUrl % '1'
|
||||||
imageSearch = '//img[@id="comic"]'
|
multipleImagesPerStrip = True
|
||||||
|
imageSearch = ['//img[@id="comic"]', '//div[@id="aftercomic"]/img']
|
||||||
prevSearch = '//a[@class="prev"]'
|
prevSearch = '//a[@class="prev"]'
|
||||||
help = 'Index format: nnnn'
|
help = 'Index format: nnnn'
|
||||||
|
textSearch = '//img[@id="comic"]/@title'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def namer(cls, imageUrl, pageUrl):
|
def namer(cls, imageUrl, pageUrl):
|
||||||
|
@ -421,15 +423,6 @@ class SpareParts(_BasicScraper):
|
||||||
help = 'Index format: yyyymmdd'
|
help = 'Index format: yyyymmdd'
|
||||||
|
|
||||||
|
|
||||||
class Spinnerette(_ParserScraper):
|
|
||||||
url = 'http://www.spinnyverse.com/'
|
|
||||||
stripUrl = url + 'comic/%s'
|
|
||||||
firstStripUrl = stripUrl % '02-09-2010'
|
|
||||||
imageSearch = '//div[@id="cc-comicbody"]//img'
|
|
||||||
prevSearch = '//a[@class="prev"]'
|
|
||||||
help = 'Index format: number'
|
|
||||||
|
|
||||||
|
|
||||||
class StandStillStaySilent(_ParserScraper):
|
class StandStillStaySilent(_ParserScraper):
|
||||||
url = 'http://www.sssscomic.com/comic.php'
|
url = 'http://www.sssscomic.com/comic.php'
|
||||||
rurl = escape(url)
|
rurl = escape(url)
|
||||||
|
|
|
@ -441,7 +441,7 @@ class _ParserScraper(Scraper):
|
||||||
searchUrls.append(match.get(attrib))
|
searchUrls.append(match.get(attrib))
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
searchUrls.append(str(match))
|
searchUrls.append(str(match))
|
||||||
if searchUrls:
|
if not cls.multipleImagesPerStrip and searchUrls:
|
||||||
# do not search other links if one pattern matched
|
# do not search other links if one pattern matched
|
||||||
break
|
break
|
||||||
if not searchUrls:
|
if not searchUrls:
|
||||||
|
|
Loading…
Reference in a new issue