Fix some more comic modules.
This commit is contained in:
parent
8b1ac4eb35
commit
1d94439715
2 changed files with 25 additions and 24 deletions
|
@ -24,12 +24,12 @@ class BadassMuthas(_BasicScraper):
|
||||||
help = 'Index format: nnn'
|
help = 'Index format: nnn'
|
||||||
|
|
||||||
|
|
||||||
class BadMachinery(_BasicScraper):
|
class BadMachinery(_ParserScraper):
|
||||||
url = 'http://scarygoround.com/'
|
url = 'http://scarygoround.com/'
|
||||||
stripUrl = url + '?date=%s'
|
stripUrl = url + '?date=%s'
|
||||||
firstStripUrl = stripUrl % '20090918'
|
firstStripUrl = stripUrl % '20090918'
|
||||||
imageSearch = compile(tagre("img", "src", r'(strips/\d+[^"]+)'))
|
imageSearch = '//img[@class="comicimg"]'
|
||||||
prevSearch = compile(tagre("a", "href", r'(\?date=\d+)') + 'Previous')
|
prevSearch = '//a[contains(text(), "Previous")]'
|
||||||
help = 'Index format: yyyymmdd'
|
help = 'Index format: yyyymmdd'
|
||||||
|
|
||||||
|
|
||||||
|
@ -111,14 +111,13 @@ class BiggerThanCheeses(_BasicScraper):
|
||||||
help = 'Index format: n (unpadded)'
|
help = 'Index format: n (unpadded)'
|
||||||
|
|
||||||
|
|
||||||
class BillyTheDunce(_BasicScraper):
|
class BillyTheDunce(_ParserScraper):
|
||||||
url = 'http://www.duncepress.com/'
|
url = 'http://www.duncepress.com/'
|
||||||
rurl = escape(url)
|
firstStripUrl = url + '2009/06/an-introduction-of-sorts'
|
||||||
stripUrl = url + '%s/'
|
imageSearch = '//div[@class="entry"]/p[1]/a'
|
||||||
firstStripUrl = stripUrl % '2009/06/an-introduction-of-sorts'
|
prevSearch = '//a[@rel="prev"]'
|
||||||
imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
|
latestSearch = '//h2[@class="post-title"]/a'
|
||||||
prevSearch = compile(r'<div class="nav-previous"><a href="(%s[^"]+)" rel="prev">' % rurl)
|
starter = indirectStarter
|
||||||
help = 'Index format: yyyy/mm/stripname'
|
|
||||||
|
|
||||||
|
|
||||||
class BizarreUprising(_BasicScraper):
|
class BizarreUprising(_BasicScraper):
|
||||||
|
|
|
@ -76,13 +76,14 @@ class ScandinaviaAndTheWorld(_ParserScraper):
|
||||||
help = 'Index format: stripname'
|
help = 'Index format: stripname'
|
||||||
|
|
||||||
|
|
||||||
class ScaryGoRound(_BasicScraper):
|
class ScaryGoRound(_ParserScraper):
|
||||||
url = 'http://www.scarygoround.com/'
|
url = 'http://www.scarygoround.com/sgr/ar.php'
|
||||||
stripUrl = url + '?date=%s'
|
stripUrl = url + 'ar.php?date=%s'
|
||||||
firstStripUrl = stripUrl % '20090918'
|
firstStripUrl = stripUrl % '20020604'
|
||||||
imageSearch = compile(tagre("img", "src", r'(strips/\d+\.png)'))
|
imageSearch = '//img[contains(@src, "/strips/")]'
|
||||||
prevSearch = compile(tagre("a", "href", r'(\?date=\d+)') + "Previous")
|
prevSearch = '//a[contains(text(), "Previous")]'
|
||||||
help = 'Index format: n (unpadded)'
|
endOfLife = True
|
||||||
|
help = 'Index format: yyyymmdd'
|
||||||
|
|
||||||
|
|
||||||
class ScenesFromAMultiverse(_BasicScraper):
|
class ScenesFromAMultiverse(_BasicScraper):
|
||||||
|
@ -186,19 +187,20 @@ class SequentialArt(_BasicScraper):
|
||||||
help = 'Index format: name'
|
help = 'Index format: name'
|
||||||
|
|
||||||
|
|
||||||
class SexyLosers(_BasicScraper):
|
class SexyLosers(_ParserScraper):
|
||||||
adult = True
|
adult = True
|
||||||
url = 'http://www.sexylosers.com/'
|
url = 'http://www.sexylosers.com/'
|
||||||
stripUrl = url + '%s.html'
|
stripUrl = url + 'comic/%s/'
|
||||||
imageSearch = compile(r'<img src\s*=\s*"\s*(comics/[\w\.]+?)"', IGNORECASE)
|
firstStripUrl = stripUrl % '003'
|
||||||
prevSearch = compile(r'<a href="(/\d{3}\.\w+?)"><font color = FFAAAA><<', IGNORECASE)
|
imageSearch = '//div[@class="entry-content"]//img'
|
||||||
latestSearch = compile(r'SEXY LOSERS <A HREF="(.+?)">Latest SL Comic \(#\d+\)</A>', IGNORECASE)
|
prevSearch = '//a[@rel="prev"]'
|
||||||
|
latestSearch = '//a[@rel="bookmark"]'
|
||||||
help = 'Index format: nnn'
|
help = 'Index format: nnn'
|
||||||
starter = indirectStarter
|
starter = indirectStarter
|
||||||
|
|
||||||
def namer(self, image_url, page_url):
|
def namer(self, image_url, page_url):
|
||||||
index = page_url.split('/')[-1].split('.')[0]
|
index = page_url.rsplit('/', 2)[1]
|
||||||
title = image_url.split('/')[-1].split('.')[0]
|
title = image_url.rsplit('/', 1)[1]
|
||||||
return index + '-' + title
|
return index + '-' + title
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue