# -*- coding: iso-8859-1 -*- # Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs from re import compile, IGNORECASE, DOTALL from ..helpers import _BasicScraper, queryNamer, bounceStarter class WayfarersMoon(_BasicScraper): latestUrl = 'http://www.wayfarersmoon.com/' imageUrl = 'http://www.wayfarersmoon.com/index.php\?page=%s' imageSearch = compile(r']+?>< PREV COMIC ') help = 'Index format: yyyymmdd' class WiguTV(_BasicScraper): latestUrl = 'http://jjrowland.com/' imageUrl = 'http://jjrowland.com/archive/%s.html' imageSearch = compile(r'"(/comics/.+?)"') prevSearch = compile(r']+?> ') help = 'Index format: yyyymmdd' class WotNow(_BasicScraper): latestUrl = 'http://shadowburn.binmode.com/wotnow/' imageUrl = 'http://shadowburn.binmode.com/wotnow/comic.php?comic_id=%s' imageSearch = compile(r'') help = 'Index format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (GUID)' namer = queryNamer('stripid') def webcomicsNation(): class _WebcomicsNation(_BasicScraper): imageSearch = compile(r'.*?]+?src="([^"]*?memberimages/.+?)"', IGNORECASE + DOTALL) prevSearch = compile(r'href="([^"]*?whichbutton=prev[^"]*?)"', IGNORECASE) help = 'Index format: nnnn (non-contiguous)' @property def imageUrl(self): return self.baseUrl + '?view=archive&chapter=%s' comics = { 'AgnesQuill': 'daveroman/agnes/', 'Elvenbaath': 'tdotodot2k/elvenbaath/', 'IrrationalFears': 'uvernon/irrationalfears/', 'KismetHuntersMoon': 'laylalawlor/huntersmoon/', 'SaikoAndLavender': 'gc/saiko/', 'MyMuse': 'gc/muse/', 'NekkoAndJoruba': 'nekkoandjoruba/nekkoandjoruba/', 'JaxEpoch': 'johngreen/quicken/', 'QuantumRockOfAges': 'DreamchildNYC/quantum/', 'ClownSamurai' : 'qsamurai/clownsamurai/', } return dict((name, type('WebcomicsNation_%s' % name, (_WebcomicsNation,), dict(name='WebcomicsNation/' + name, latestUrl='http://www.webcomicsnation.com/' + subpath))) for name, subpath in comics.items()) globals().update(webcomicsNation()) class WhiteNoise(_BasicScraper): latestUrl = 'http://www.wncomic.com/archive.php' imageUrl = 'http://www.wncomic.com/archive_comments.php?strip_id=%s' imageSearch = compile(r'(istrip_files/strips/.+?)"') prevSearch = compile(r']+?>Previous') help = 'Index format: strip-name' class WrongWay(_BasicScraper): latestUrl = 'http://www.wrongwaycomics.com/' imageUrl = 'http://www.wrongwaycomics.com/%s.html' imageSearch = compile(r'') help = 'Index format: yyyy/mm/dd/stripname' class _WLP(_BasicScraper): imageSearch=compile(r'SRC="(http://www.wlpcomics.com/adult/.+?|http://www.wlpcomics.com/general/.+?)"', IGNORECASE) prevSearch=compile(r' Previous Page', IGNORECASE) help='Index format: nnn' @property def baseUrl(self): return 'http://www.wlpcomics.com/%s' % (self.path,) @property def imageUrl(self): return self.baseUrl + '%s.html' def namer(self, imageUrl, pageUrl): return pageUrl.split('/')[-1].split('.')[0] def starter(self): # XXX: ergh meth = bounceStarter(self.baseUrl, compile(r' Next Page', IGNORECASE)) return meth.__get__(self, type(self))() class ChichiChan(_WLP): name = 'WLP/ChichiChan' path = 'adult/chichi/' class ChocolateMilkMaid(_WLP): name = 'WLP/ChocolateMilkMaid' path = 'adult/cm/' class MaidAttack(_WLP): name = 'WLP/MaidAttack' path = 'general/maidattack/' class ShadowChasers(_WLP): name = 'WLP/ShadowChasers' path = 'general/shadowchasers/' class Stellar(_WLP): name = 'WLP/Stellar' path = 'adult/stellar/' class Wondermark(_BasicScraper): latestUrl = 'http://wondermark.com' imageUrl = 'http://wondermark.com/%s/' imageSearch = compile(r'') help = 'Index format: nnn'