Add CutLoose

This commit is contained in:
Techwolf 2019-06-29 12:41:15 -07:00 committed by Tobias Gruetzmacher
parent 81e4942e7c
commit 280f4fdbb8

View file

@ -8,7 +8,7 @@ from __future__ import absolute_import, division, print_function
from re import compile, escape from re import compile, escape
from ..scraper import _BasicScraper, _ParserScraper from ..scraper import _BasicScraper, _ParserScraper
from ..helpers import indirectStarter from ..helpers import bounceStarter, indirectStarter
from ..util import tagre from ..util import tagre
from .common import _TumblrScraper, _WordPressScraper, _WPNavi from .common import _TumblrScraper, _WordPressScraper, _WPNavi
@ -335,6 +335,22 @@ class Curvy(_ParserScraper):
help = 'Index format: yyyymmdd' help = 'Index format: yyyymmdd'
class CutLoose(_ParserScraper):
url = 'https://www.cutloosecomic.com/'
stripUrl = url + 'archive/comic/%s'
firstStripUrl = stripUrl % '2016/02/02'
imageSearch = '//img[@id="comic-container"]'
prevSearch = '//a[@title="Previous Comic"]'
nextSearch = '//a[@title="Next Comic"]'
starter = bounceStarter
adult = True
def namer(self, imageUrl, pageUrl):
postDate = pageUrl.rsplit('/', 3)
filename = imageUrl.rsplit('/', 1)[-1]
return '%s-%s-%s_%s' % (postDate[1], postDate[2], postDate[3], filename)
class CyanideAndHappiness(_BasicScraper): class CyanideAndHappiness(_BasicScraper):
url = 'http://www.explosm.net/' url = 'http://www.explosm.net/'
stripUrl = url + '%s/' stripUrl = url + '%s/'