# -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
from re import compile
from ..util import tagre
from ..scraper import _BasicScraper
class BadlyDrawnKitties(_BasicScraper):
latestUrl = 'http://www.badlydrawnkitties.com/'
imageUrl = 'http://www.badlydrawnkitties.com/new/%s.html'
imageSearch = compile(r'')
prevSearch = compile(r'"(/new/.+?)".+?previous.gif')
help = 'Index format: n (unpadded)'
class Bardsworth(_BasicScraper):
latestUrl = 'http://www.bardsworth.com/'
imageUrl = 'http://www.bardsworth.com/archive.php?p=s%'
imageSearch = compile(r'(strips/.+?)"')
prevSearch = compile(r'"(http.+?)".+?/prev')
help = 'Index format: nnn'
class BetterDays(_BasicScraper):
latestUrl = 'http://www.jaynaylor.com/betterdays/'
imageUrl = 'http://www.jaynaylor.com/betterdays/archives/%s'
imageSearch = compile(r'')
prevSearch = compile(r'« Previous')
help = 'Index format: yyyy/mm/.html'
class BetterYouThanMe(_BasicScraper):
latestUrl = 'http://betteryouthanme.net/'
imageUrl = 'http://betteryouthanme.net/archive.php?date=%s.gif'
imageSearch = compile(r'"(comics/.+?)"')
prevSearch = compile(r'"(archive.php\?date=.+?)">.+?previous')
help = 'Index format: yyyymmdd'
class BiggerThanCheeses(_BasicScraper):
latestUrl = 'http://www.biggercheese.com'
imageUrl = 'http://www.biggercheese.com/index.php?comic=%s'
imageSearch = compile(r'src="(comics/.+?)" alt')
prevSearch = compile(r'"(index.php\?comic=.+?)".+?_back')
help = 'Index format: n (unpadded)'
class BizarreUprising(_BasicScraper):
latestUrl = 'http://www.bizarreuprising.com/'
imageUrl = 'http://www.bizarreuprising.com/view/%s'
imageSearch = compile(r'(◄|⇐ Previous)')
help = 'Index format: yyyy/mm/dd/strip-name-author-name'
class Bhag(_BasicScraper):
latestUrl = 'http://bhag.sackofjustice.com/'
imageUrl = 'http://bhag.sackofjustice.com/daily.php?date='
imageSearch = compile(r'/(comics/.+?)">')
prevSearch = compile(r'first.+?/(daily.php\?date=.+?)".+?previous')
help = 'Index format: yymmdd'
def blankLabel(name, baseUrl):
return type('BlankLabel_%s' % name,
(_BasicScraper,),
dict(
name='BlankLabel/' + name,
latestUrl=baseUrl,
imageUrl='/d/%s.shtml',
imageSearch=compile(tagre("img", "src", r'(/comic[s|/][^"]+)')),
prevSearch=compile(tagre("a", "href", r'(/d/\d+\.shtml)')+r"[^>]+/images/nav_02\.gif"),
#prevSearch=compile(r'(?:"([^"]*(?:/d/[^"\r\n]*)|(?:/strip/.+?))")(?:(?:.{43}starshift_back.gif)|(?:.+?cxn_previous)|(?:.{43}previous)|(?:[^<>]*>[^<>]*<[^<>]*previous)|(?:.*?back_button)|(?:.*?comicnav-previous))'),
help='Index format: yyyymmdd')
)
checkerboard = blankLabel('CheckerboardNightmare', 'http://www.checkerboardnightmare.com')
courtingDisaster = blankLabel('CourtingDisaster', 'http://www.courting-disaster.com/')
evilInc = blankLabel('EvilInc', 'http://www.evil-comic.com/')
greystoneInn = blankLabel('GreystoneInn', 'http://www.greystoneinn.net/')
itsWalky = blankLabel('ItsWalky', 'http://www.itswalky.com/')
# one strip name starts with %20
#krazyLarry = blankLabel('KrazyLarry', 'http://www.krazylarry.com/')
melonpool = blankLabel('Melonpool', 'http://www.melonpool.com/')
# strip names = index.php
#realLife = blankLabel('RealLife', 'http://www.reallifecomics.com/')
schlockMercenary = blankLabel('SchlockMercenary', 'http://www.schlockmercenary.com/')
# hosted on ComicsDotCom
#sheldon = blankLabel('Sheldon', 'http://www.sheldoncomics.com/')
shortpacked = blankLabel('Shortpacked', 'http://www.shortpacked.com/')
starslipCrisis = blankLabel('StarslipCrisis', 'http://www.starslipcrisis.com/')
uglyHill = blankLabel('UglyHill', 'http://www.uglyhill.com/')
class BeePower(_BasicScraper):
latestUrl = 'http://comicswithoutviolence.com/d/20080713.html'
imageUrl = 'http://comicswithoutviolence.com/d/%s.html'
imageSearch = compile(r'src="(/comics/.+?)"')
prevSearch = compile(r'(\d+\.html)">]+?src="/images/previous_day.png"')
help = 'Index format: yyyy/mm/dd'
class Bellen(_BasicScraper):
latestUrl = 'http://boxbrown.com/'
imageUrl = 'http://boxbrown.com/?p=%s'
imageSearch = compile(r'')
help = 'Index format: nnn'
class BlankIt(_BasicScraper):
latestUrl = 'http://blankitcomics.com/'
imageUrl = 'http://blankitcomics.com/%s'
imageSearch = compile(r'')
help = 'Index format: yyyy/mm/dd/name'
class BobWhite(_BasicScraper):
latestUrl = 'http://www.bobwhitecomics.com/'
imageUrl = 'http://www.bobwhitecomics.com/?webcomic_post=%s'
imageSearch = compile(tagre("img", "src", r"(http://www\.bobwhitecomics\.com/wp/wp-content/webcomic/untitled/\d+.jpg)"))
prevSearch = compile(tagre("a", "href", "(http://www\.bobwhitecomics\.com/\?webcomic_post=\d+)")+r'[^"]+Previous')
help = 'Index format: yyyymmdd'
class BigFatWhale(_BasicScraper):
latestUrl = 'http://www.bigfatwhale.com/'
imageUrl = 'http://www.bigfatwhale.com/archives/bfw_%s.htm'
imageSearch = compile(r']+?>Previous')
help = 'Index format: (sometimes chapternumber/)-yyyy-mm-dd/stripname'
class BrightlyWound(_BasicScraper):
latestUrl = 'http://www.brightlywound.com/'
imageUrl = 'http://www.brightlywound.com/?comic=%s'
imageSearch = compile(r'')
help = 'Index format: yyyy-mm-dd'
class BloodBound(_BasicScraper):
latestUrl = 'http://www.bloodboundcomic.com/'
imageUrl = 'http://www.bloodboundcomic.com/d/%s.html'
imageSearch = compile(r' src="(/comics/.+?)"')
prevSearch = compile(r' ]+?src="/images/previous_day.jpg"')
help = 'Index format: yyyymmdd'
class BookOfBiff(_BasicScraper):
latestUrl = 'http://www.thebookofbiff.com/'
imageUrl = 'http://www.thebookofbiff.com/%s'
imageSearch = compile(r'◄ Previous')
help = 'Index format: yyyy/mm/dd/stripnum-strip-name'
class BillyTheDunce(_BasicScraper):
latestUrl = 'http://www.duncepress.com/'
imageUrl = 'http://www.duncepress.com/%s/'
imageSearch = compile(r'')
help = 'Index format: yyyy/mm/strip-name'
class BackwaterPlanet(_BasicScraper):
latestUrl = 'http://www.backwaterplanet.com/current.htm'
imageUrl = 'http://www.backwaterplanet.com/archive/bwp%s.htm'
imageSearch = compile(r'')
prevSearch = compile(r'')
help = 'Index format: yyyy/mm/dd/strip-name'
class BetweenFailures(_BasicScraper):
latestUrl = 'http://betweenfailures.com/'
imageUrl = 'http://betweenfailures.com/%s'
imageSearch = compile(r'')
prevSearch = compile(r'« Previous')
help = 'Index format: yyyy/mm/dd/stripnum-strip-name'
class BillyTheBeaker(_BasicScraper):
latestUrl = 'http://billy.defectivejunk.com/'
imageUrl = 'http://billy.defectivejunk.com/index.php?strip=%s'
imageSearch = compile(r'')
help = 'Index format: nnn'