add a comic plugin for CommitStrip

This commit is contained in:
clonejo 2017-09-18 21:31:15 +02:00
parent ad8374d7b8
commit 331faae3ea
No known key found for this signature in database
GPG key ID: D8B81FDC9310A684

View file

@ -175,6 +175,31 @@ class Comedity(_BasicScraper):
help = 'Index format: n (no padding)'
class CommitStrip(_ParserScraper):
baseUrl = 'https://www.commitstrip.com/en/'
url = baseUrl + '?setLocale=1' # ensure the language cookie is set
stripUrl = baseUrl + '%s/'
firstStripUrl = 'http://www.commitstrip.com/en/2012/02/22/interview/' # non-TLS!
latestSearch = '//section//a'
starter = indirectStarter
imageSearch = '//article/div//img'
prevSearch = '//span[@class="nav-previous"]/a'
help = 'Index format: yyyy/mm/dd/strip-name'
def namer(self, image_url, page_url):
parts = page_url.rstrip('/').rsplit('/')[-4:]
return '-'.join(parts)
class CommitStripFr(CommitStrip):
baseUrl = 'https://www.commitstrip.com/fr/'
url = baseUrl + '?setLocale=1' # ensure the language cookie is set
stripUrl = baseUrl + '%s/'
firstStripUrl = 'http://www.commitstrip.com/fr/2012/02/22/interview/' # non-TLS!
lang = 'fr'
class CompanyY(_BasicScraper):
url = 'http://company-y.com/'
rurl = escape(url)