# -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
from re import compile
from ..helpers import (
_BasicScraper, constStarter, bounceStarter, indirectStarter)
from ..util import getQueryParams
class CalvinAndHobbes(_BasicScraper):
latestUrl = 'http://www.gocomics.com/calvinandhobbes/'
imageUrl = 'http://www.gocomics.com/calvinandhobbes/%s'
imageSearch = compile(r'src="(http://picayune\.uclick\.com/comics/ch/[^"]+\.gif)"')
prevSearch = compile(r'href="(.*?)"\s+onclick="[^"]*">Previous day')
help = 'Index format: yyyy/mm/dd'
class CandyCartoon(_BasicScraper):
latestUrl = 'http://www.candycartoon.com/'
imageUrl = 'http://www.candycartoon.com/archives/%s.html'
imageSearch = compile(r'prev')
help = 'Index format: nnnnnn'
class CaptainSNES(_BasicScraper):
latestUrl = 'http://captainsnes.com/'
imageUrl = 'http://captainsnes.com/?date=%s'
imageSearch = compile(r'')
help = 'Index format: yyyymmdd'
class CaribbeanBlue(_BasicScraper):
latestUrl = 'http://cblue.katbox.net/'
imageUrl = 'http://cblue.katbox.net/index.php?strip_id=%s'
imageSearch = compile(r'="(.+?strips/.+?)"')
prevSearch = compile(r'.+?"(.+?)".+?Previous')
help = 'Index format: n (unpadded)'
class Catharsis(_BasicScraper):
latestUrl = 'http://catharsiscomic.com/'
imageUrl = 'http://catharsiscomic.com/archive.php?strip=%s'
imageSearch = compile(r'')
help = 'Index format: yyyy/mm/dd/strip-name'
class ChugworthAcademy(_BasicScraper):
latestUrl = 'http://chugworth.com/'
imageUrl = 'http://chugworth.com/?p=%s'
imageSearch = compile(r']+?title="Previous">')
help = 'Index format: n (unpadded)'
class ChugworthAcademyArchive(_BasicScraper):
latestUrl = 'http://chugworth.com/archive/?strip_id=422'
imageUrl = 'http://chugworth.com/archive/?strip_id=%s'
imageSearch = compile(r'&laq')
help = 'Index format: non'
class CombustibleOrange(_BasicScraper):
latestUrl = 'http://www.combustibleorange.com/'
imageUrl = 'http://www.combustibleorange.com/index.php?current=%s'
imageSearch = compile(r'')
help = 'Index format: n (unpadded)'
class Comedity(_BasicScraper):
latestUrl = 'http://www.comedity.com/'
imageUrl = 'http://www.comedity.com/index.php?strip_id=%s'
imageSearch = compile(r' *‹')
help = 'Index format: n'
class CoolCatStudio(_BasicScraper):
latestUrl = 'http://www.coolcatstudio.com/'
imageUrl = 'http://www.coolcatstudio.com/index.php?p=%s'
imageSearch = compile(r'(/comics/.+?)"')
prevSearch = compile(r"href='(.+?)'>PREV")
help = 'Index format: n'
class CourtingDisaster(_BasicScraper):
latestUrl = 'http://www.courting-disaster.com/'
imageUrl = 'http://www.courting-disaster.com/archive/%s.html'
imageSearch = compile(r'(/comics/.+?)"')
prevSearch = compile(r']+?>')
help = 'Index format: yyyymmdd'
class CrapIDrewOnMyLunchBreak(_BasicScraper):
latestUrl = 'http://crap.jinwicked.com/'
imageUrl = 'http://crap.jinwicked.com/%s'
imageSearch = compile(r'<< Previous page')
help = 'Index format: yyyymmdd'
def cloneManga(name, shortName, lastStrip=None):
baseUrl = 'http://manga.clone-army.org/%s.php' % (shortName,)
imageUrl = baseUrl + '?page=%s'
if lastStrip is None:
starter = bounceStarter(baseUrl, compile(r'◄ Previous')
help = 'Index format: n (unpadded)'
def comicsDotCom(name, section):
baseUrl = 'http://www.comics.com/%s/%s/archive/' % (section, name)
@classmethod
def namer(cls, imageUrl, pageUrl):
htmlname = pageUrl.split('/')[-1]
filename = htmlname.split('.')[0]
return filename
return type('ComicsDotCom_%s' % name,
(_BasicScraper,),
dict(
name='ComicsDotCom/' + name,
starter=indirectStarter(baseUrl, compile(r'(?:(?:'),
prevSearch=compile(r'< Previous')
help = 'Index format: n (unpadded)'
class CrimsonDark(_BasicScraper):
latestUrl = 'http://www.davidcsimon.com/crimsondark/'
imageUrl = 'http://www.davidcsimon.com/crimsondark/index.php?view=comic&strip_id=%s'
imageSearch = compile(r'src="(.+?strips/.+?)"')
prevSearch = compile(r'')
help = 'Index format: nnn'
class CowboyJedi(_BasicScraper):
latestUrl = 'http://www.cowboyjedi.com/'
imageUrl = 'http://www.cowboyjedi.com/%s'
imageSearch = compile(r'')
help = 'Index format: nnn'
class Collar6(_BasicScraper):
latestUrl = 'http://collar6.com/'
imageUrl = 'http://collar6.com/%s'
imageSearch = compile(r'src="(http://collar6.com/comics/.+?)"')
prevSearch = compile(r' href="(http://collar6.com/\d+/\S+)">◄ Previous')
help = 'Index format: yyyy/namednumber'
class Chester5000XYV(_BasicScraper):
latestUrl = 'http://jessfink.com/Chester5000XYV/'
imageUrl = 'http://jessfink.com/Chester5000XYV/?p=%s'
imageSearch = compile(r'')
help = 'Index format: nnn'
class CalamitiesOfNature(_BasicScraper):
latestUrl = 'http://www.calamitiesofnature.com/'
imageUrl = 'http://www.calamitiesofnature.com/archive/?c=%s'
imageSearch = compile(r'')
help = 'Index format: nnn'
class Champ2010(_BasicScraper):
latestUrl = 'http://www.jedcollins.com/champ2010/'
imageUrl = 'http://jedcollins.com/champ2010/?p=%s'
imageSearch = compile(r'Next>'))
imageUrl = 'http://corydoncafe.com/comic-%s.html'
imageSearch = compile(r'<Previous')
help = 'Index format: nnn'
@classmethod
def namer(cls, imageUrl, pageUrl):
return pageUrl.split('/')[-1].split('.')[0]
class CraftedFables(_BasicScraper):
latestUrl = 'http://www.craftedfables.com/'
imageUrl = 'http://www.caf-fiends.net/craftedfables/?p=%s'
imageSearch = compile(r'')
help = 'Index format: nnn'
class Currhue(_BasicScraper):
latestUrl = 'http://www.currhue.com/'
imageUrl = 'http://www.currhue.com/?p=%s'
imageSearch = compile(r'