Merge pull request #92 from clonejo/feature/commitstrip

add a comic plugin for CommitStrip
This commit is contained in:
Tobias Gruetzmacher 2017-09-20 22:46:46 +02:00
commit 6369203bc0

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)