# -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2013 Bastian Kleineidam
from re import compile, escape
from ..scraper import _BasicScraper
from ..helpers import bounceStarter, indirectStarter
from ..util import tagre
class Caggage(_BasicScraper):
url = 'http://caggagecomic.com/'
rurl = escape(url)
stripUrl = url + 'archives/%s'
firstStripUrl = stripUrl % '77'
imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
prevSearch = compile(tagre("a", "href", r'(%sarchives/\d+)' % rurl, after="prev"))
help = 'Index format: number'
class CaptainSNES(_BasicScraper):
url = 'http://www.captainsnes.com/'
rurl = escape(url)
stripUrl = url + '%s/'
firstStripUrl = stripUrl % '2001/07/10/the-mistake'
imageSearch = compile(tagre("img", "src", r"(%scomics/[^']+)" % rurl, quote="'"))
prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl) + tagre("span", "class", "prev"))
multipleImagesPerStrip = True
help = 'Index format: yyyy/mm/dd/nnn-stripname'
class CaseyAndAndy(_BasicScraper):
url = 'http://www.galactanet.com/comic/'
stripUrl = url + 'view.php?strip=%s'
firstStripUrl = stripUrl % '1'
imageSearch = compile(tagre("img", "src", r'(Strip\d+\.gif)'))
prevSearch = compile(tagre("a", "href", r'(view\.php\?strip=\d+)')
+ tagre("img", "src", r'previous\.gif'))
help = 'Index format: number'
class CasuallyKayla(_BasicScraper):
description = u'Casually Kayla: Keeping it as Casual as possible'
url = 'http://casuallykayla.com/'
stripUrl = url + '?p=%s'
firstStripUrl = stripUrl % '89'
imageSearch = compile(tagre("img", "src", r'(http://casuallykayla\.com/comics/[^"]+)'))
prevSearch = compile(tagre("div", "class", r'nav-previous') + tagre("a", "href", r'([^"]+)'))
help = 'Index format: nnn'
class Catalyst(_BasicScraper):
baseUrl = "http://catalyst.spiderforest.com/"
rurl = escape(baseUrl)
url = baseUrl + "comic.php?comic_id=415"
stripUrl = baseUrl + "comic.php?comic_id=%s"
firstStripUrl = stripUrl % '1'
imageSearch = compile(tagre("img", "src", r'((?:%s)?comics/[^"]+)' % rurl))
prevSearch = compile("
" + tagre("a", "href", r'(%scomic\.php\?comic_id=\d+)' % rurl))
help = 'Index format: number'
class CatAndGirl(_BasicScraper):
url = 'http://catandgirl.com/'
rurl = escape(url)
stripUrl = url + '?p=%s'
firstStripUrl = stripUrl % '1602'
imageSearch = compile(tagre("img", "src", r'(%sarchive/[^"]+)' % rurl))
prevSearch = compile(tagre("a", "href", r'([^"]+)')+r"[^<]+Previous")
help = 'Index format: n (unpadded)'
class Catena(_BasicScraper):
url = 'http://catenamanor.com/'
rurl = escape(url)
stripUrl = url + '%s/'
firstStripUrl = stripUrl % '2003/06/17/the-start-of-it-all'
imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
prevSearch = compile(tagre("a", "href", r'([^"]+)', after='rel="prev"'))
help = 'Index format: yyyy/mm/dd/'
class CatsAndCameras(_BasicScraper):
description = u'Just when you thought it was safe to go to the photographer'
url = 'http://catsncameras.com/cnc/'
rurl = escape(url)
stripUrl = url + '?p=%s'
imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
prevSearch = compile(tagre("div", "class", r'nav-previous') +
tagre("a", "href", r'(%s[^"]+)' % rurl))
help = 'Index format: nnn'
class ChainsawSuit(_BasicScraper):
description = u'internet humor, fresh-cut'
url = 'http://chainsawsuit.com/'
rurl = escape(url)
stripUrl = url + '%s/'
firstStripUrl = stripUrl % '2008/03/12/strip-338'
imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
prevSearch = compile(tagre("a", "href", r'(%s\d+/\d+/\d+/[^"]+)' % rurl, after="prev"))
help = 'Index format: yyyy/mm/dd/stripname'
class Champ2010(_BasicScraper):
description = u'Champ2010 - an almost daily journal comic from jed collins who is not drinking this year. webcomic'
baseUrl = 'http://jedcollins.com/champ2010/'
rurl = escape(baseUrl)
# the latest URL is hard coded since the comic is discontinued
url = baseUrl + 'champ-12-30-10.html'
stripUrl = baseUrl + '%s.html'
firstStripUrl = stripUrl % 'champ1-1-10-fuck'
imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="Previous"))
help = 'Index format: yy-dd-mm'
class ChannelAte(_BasicScraper):
description = u'Comics and Cartoons by Ryan Hudson'
url = 'http://www.channelate.com/'
rurl = escape(url)
stripUrl = url + '%s/'
imageSearch = compile(tagre("img", "src", r'(%scomics/\d+-\d+-\d+[^"]+)' % rurl))
prevSearch = compile(tagre("a", "href", r'(%s\d+/\d+/\d+/[^"]+)' % rurl, after="prev"))
help = 'Index format: yyyy/mm/dd/name'
class ChasingTheSunset(_BasicScraper):
description = u'Chasing the Sunset | Fantasy Webcomic | Elves, Pixies and a blue dragon with orange stripes.'
url = 'http://www.fantasycomic.com/'
stripUrl = url + 'index.php?p=c%s'
firstStripUrl = stripUrl % '1'
imageSearch = compile(r'(/cmsimg/.+?)".+?comic-img')
prevSearch = compile(r']+/images/(?:nav_02|previous_day)\.gif")
help='Index format: yyyymmdd'
class Chester5000XYV(_BasicScraper):
url = 'http://jessfink.com/Chester5000XYV/'
stripUrl = url + '?p=%s'
firstStripUrl = stripUrl % '34'
imageSearch = compile(tagre("img", "src", r'(http://jessfink\.com/Chester5000XYV/comics/[^"]+)'))
prevSearch = compile(r'')
help = 'Index format: nnn'
class Chisuji(_BasicScraper):
url = 'http://www.chisuji.com/'
stripUrl = url + '%s/'
firstStripUrl = stripUrl % '2009/05/02/chisujiposter01'
imageSearch = compile(r'')
help = 'Index format: yyyy/mm/dd/strip-name'
class Chucklebrain(_BasicScraper):
url = 'http://www.chucklebrain.com/main.php'
starter = indirectStarter(url,
compile(tagre("a", "href", r'(/main\.php\?img\=\d+)', quote="'") +
tagre("img", "src", r'/images/last\.jpg', quote="'")))
stripUrl = url + '?img=%s'
firstStripUrl = stripUrl % '19'
imageSearch = compile(tagre("img", "src", r'(/images/strip[^"]+)'))
prevSearch = compile(tagre("a", "href", r'(/main\.php\?img\=\d+)', quote="'") +
tagre("img", "src", r'/images/previous\.jpg', quote="'"))
help = 'Index format: nnn'
class ChugworthAcademy(_BasicScraper):
url = 'http://chugworth.com/'
stripUrl = url + '?p=%s'
firstStripUrl = stripUrl % '12'
imageSearch = compile(r']+?title="Previous">')
help = 'Index format: n (unpadded)'
class ChugworthAcademyArchive(_BasicScraper):
url = 'http://chugworth.com/archive/?strip_id=422'
stripUrl = 'http://chugworth.com/archive/?strip_id=%s'
firstStripUrl = stripUrl % '0'
imageSearch = compile(r'&laq')
help = 'Index format: non'
class Collar6(_BasicScraper):
url = 'http://collar6.com/'
rurl = escape(url)
stripUrl = url + 'archive/%s'
firstStripUrl = stripUrl % 'collar-6-187'
imageSearch = compile(tagre("img", "src", r'(%swp-content/webcomic/collar6/[^"]+)' % rurl))
prevSearch = compile(tagre("a", "href", r'(%sarchive/[^"]+)' % rurl, after="previous"))
help = 'Index format: '
class Comedity(_BasicScraper):
url = 'http://www.comedity.com/'
stripUrl = url + 'index.php?strip_id=%s'
firstStripUrl = stripUrl % '1'
imageSearch = compile(r' *