2012-06-20 20:41:04 +00:00
|
|
|
# -*- coding: iso-8859-1 -*-
|
|
|
|
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
|
2012-11-21 20:57:26 +00:00
|
|
|
# Copyright (C) 2012 Bastian Kleineidam
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
from re import compile
|
|
|
|
|
2012-10-11 19:32:15 +00:00
|
|
|
from ..util import tagre
|
2012-10-11 10:03:12 +00:00
|
|
|
from ..scraper import _BasicScraper
|
2012-12-02 17:35:06 +00:00
|
|
|
from ..helpers import indirectStarter
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Bardsworth(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.bardsworth.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + '?p=%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.bardsworth\.com/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://www\.bardsworth\.com/[^"]+)', after="prev"))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: nnn'
|
|
|
|
|
|
|
|
|
|
|
|
class BetterDays(_BasicScraper):
|
2012-11-20 17:53:53 +00:00
|
|
|
latestUrl = 'http://jaynaylor.com/betterdays/'
|
|
|
|
stripUrl = latestUrl + 'archives/%s.html'
|
2012-12-02 17:35:06 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(/betterdays/comic/[^>]+)', quote=""))
|
2012-11-20 17:53:53 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'([^"]+)') + '« Previous')
|
|
|
|
help = 'Index format: yyyy/mm/<your guess>'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
class BiggerThanCheeses(_BasicScraper):
|
2012-11-20 17:53:53 +00:00
|
|
|
latestUrl = 'http://www.biggercheese.com/'
|
|
|
|
stripUrl = latestUrl + 'index.php?comic=%s'
|
2012-06-20 19:58:13 +00:00
|
|
|
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/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'view/%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(comic/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(view/\d+/[^"]+)') + tagre("img", "src", r'images/b_prev\.gif'))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: n/name'
|
|
|
|
|
|
|
|
|
|
|
|
class Blip(_BasicScraper):
|
|
|
|
latestUrl = 'http://blipcomic.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'index.php?strip_id=%s'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'(istrip_files/strips/.+?)"')
|
|
|
|
prevSearch = compile(r'First.+?"(index.php\?strip_id=.+?)".+?prev')
|
|
|
|
help = 'Index format: n'
|
|
|
|
|
|
|
|
|
|
|
|
class BlueCrashKit(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.bluecrashkit.com/cheese/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'node/%s'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'(/cheese/files/comics/.+?)"')
|
|
|
|
prevSearch = compile(r'(/cheese/node/.+?)".+?previous')
|
|
|
|
help = 'Index format: non'
|
|
|
|
|
|
|
|
|
|
|
|
class BMovieComic(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.bmoviecomic.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + '?cid=%s'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'"(comics/.+?)"')
|
|
|
|
prevSearch = compile(r'(\?cid=.+?)".+?Prev')
|
|
|
|
help = 'Index format: n'
|
|
|
|
|
|
|
|
|
|
|
|
### With BratHalla there is no 'previous' link at comic 360
|
|
|
|
### You will need to use
|
|
|
|
### mainline -c BratHalla:360-backup-dad-unstable-plans/
|
|
|
|
### to get earlier comics
|
|
|
|
class BratHalla(_BasicScraper):
|
|
|
|
latestUrl = 'http://brat-halla.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'comic/%s'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r"(/comics/.+?)' target='_blank")
|
|
|
|
prevSearch = compile(r'headernav2".+?"(http.+?)"')
|
|
|
|
help = 'Index format: non'
|
|
|
|
|
|
|
|
|
|
|
|
class Brink(_BasicScraper):
|
|
|
|
latestUrl = 'http://paperfangs.com/brink/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + '?p=%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://paperfangs\.com/brink/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://paperfangs\.com/brink/[^"]+)', after="prev"))
|
|
|
|
help = 'Index format: n'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
class BoredAndEvil(_BasicScraper):
|
2012-12-02 17:35:06 +00:00
|
|
|
baseUrl = 'http://www.boredandevil.com/'
|
|
|
|
stripUrl = baseUrl + '?date=%s'
|
2012-11-20 17:53:53 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(strips/[^"]+)'))
|
2012-06-20 19:58:13 +00:00
|
|
|
prevSearch = compile(r'First Comic.+<a href="(.+?)".+previous-on.gif')
|
2012-12-02 17:35:06 +00:00
|
|
|
starter = indirectStarter(baseUrl, prevSearch)
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: yyyy-mm-dd'
|
|
|
|
|
|
|
|
|
|
|
|
class BoyOnAStickAndSlither(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.boasas.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'page/%s'
|
2012-12-02 17:35:06 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://\d+\.media\.tumblr\.com/[^"]+_1280\.png)'))
|
2012-11-20 17:53:53 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(/page/\d+)') + "<span>Next page")
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: n (unpadded)'
|
|
|
|
|
2012-12-07 23:45:18 +00:00
|
|
|
@classmethod
|
|
|
|
def namer(cls, imageUrl, pageUrl):
|
|
|
|
return pageUrl.rsplit('/')[-1]
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
class ButternutSquash(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.butternutsquash.net/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + '%s'
|
2012-11-13 05:51:54 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.butternutsquash\.net/comics/[^"]+)'))
|
2012-11-13 18:12:28 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://www\.butternutsquash\.net/[^"]+)', after="prev"))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: yyyy/mm/dd/strip-name-author-name'
|
|
|
|
|
|
|
|
|
|
|
|
class BlankIt(_BasicScraper):
|
|
|
|
latestUrl = 'http://blankitcomics.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + '%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://blankitcomics\.com/bicomics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'([^"]+)', after='rel="prev"'))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: yyyy/mm/dd/name'
|
|
|
|
|
|
|
|
|
|
|
|
class BobWhite(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.bobwhitecomics.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + '?webcomic_post=%s'
|
2012-10-11 19:32:15 +00:00
|
|
|
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')
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: yyyymmdd'
|
|
|
|
|
|
|
|
|
|
|
|
class BigFatWhale(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.bigfatwhale.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'archives/bfw_%s.htm'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(archives/bfw_[^"]+|bfw_[^"]+)'))
|
2012-06-20 19:58:13 +00:00
|
|
|
prevSearch = compile(r' HREF="(.+?)" TARGET="_top" TITLE="Previous Cartoon"')
|
|
|
|
help = 'Index format: nnn'
|
|
|
|
|
|
|
|
|
|
|
|
class BadassMuthas(_BasicScraper):
|
|
|
|
latestUrl = 'http://badassmuthas.com/pages/comic.php'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + '?%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(/images/comicsissue[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'([^"]+)') + tagre("img", "src", r'/images/comicsbuttonBack\.gif'))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: nnn'
|
|
|
|
|
|
|
|
|
|
|
|
class BrightlyWound(_BasicScraper):
|
2012-12-02 17:35:06 +00:00
|
|
|
baseUrl = 'http://www.brightlywound.com/'
|
|
|
|
latestUrl = baseUrl + '?comic=137'
|
|
|
|
stripUrl = baseUrl + '?comic=%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r"(comic/[^']+)", quote="'"))
|
2012-06-20 19:58:13 +00:00
|
|
|
prevSearch = compile(r'<div id=\'navback\'><a href=\'(\?comic\=\d+)\'><img src=\'images/previous.png\'')
|
|
|
|
help = 'Index format: nnn'
|
|
|
|
|
|
|
|
|
|
|
|
class BlueCrashKit(_BasicScraper):
|
2012-11-20 17:53:53 +00:00
|
|
|
latestUrl = 'http://robhamm.com/bluecrashkit/'
|
|
|
|
stripUrl = latestUrl + 'comics/blue-crash-kit/%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://robhamm\.com/bluecrashkit/sites/default/files/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(r'<li class="previous"><a href="([^"]+)">')
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: yyyy-mm-dd'
|
|
|
|
|
|
|
|
|
|
|
|
class BloodBound(_BasicScraper):
|
2012-11-20 17:53:53 +00:00
|
|
|
latestUrl = 'http://bloodboundcomic.com/'
|
|
|
|
stripUrl = latestUrl + '%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://bloodboundcomic\.com/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://bloodboundcomic\.com/[^"]+)', after="prev"))
|
|
|
|
help = 'Index format: yyyy/mm/name'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
class BookOfBiff(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.thebookofbiff.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + '%s'
|
2012-11-13 18:12:28 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'([^"]+/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'([^"]+)', after="Previous"))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: yyyy/mm/dd/stripnum-strip-name'
|
|
|
|
|
|
|
|
|
|
|
|
class BillyTheDunce(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.duncepress.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + '%s/'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.duncepress\.com/comics/[^"]+)'))
|
2012-06-20 19:58:13 +00:00
|
|
|
prevSearch = compile(r'<div class="nav-previous"><a href="(http://www.duncepress.com/[^"]+)" rel="prev">')
|
|
|
|
help = 'Index format: yyyy/mm/strip-name'
|
|
|
|
|
|
|
|
|
|
|
|
class BackwaterPlanet(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.backwaterplanet.com/current.htm'
|
2012-11-13 18:10:19 +00:00
|
|
|
stripUrl = 'http://www.backwaterplanet.com/archive/bwp%s.htm'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'<img src="(/images/comic/bwp.+?)">')
|
|
|
|
prevSearch = compile(r'<a href="(/archive/bwp.+?)"><img src="(images/Previous.jpg|/images/Previous.jpg)"')
|
|
|
|
help = 'Index format: yymmdd'
|
|
|
|
|
|
|
|
|
|
|
|
class Baroquen(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.baroquencomics.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + '%s/'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.baroquencomics\.com/Comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://www\.baroquencomics\.com/[^"]+)', after='prev'))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: yyyy/mm/dd/strip-name'
|
|
|
|
|
|
|
|
|
|
|
|
class BetweenFailures(_BasicScraper):
|
|
|
|
latestUrl = 'http://betweenfailures.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'archives/archive/%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://betweenfailures\.com/wp-content/webcomic/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://betweenfailures\.com/archives/archive/[^"]+)', after="previous"))
|
|
|
|
help = 'Index format: stripnum-strip-name'
|
2012-06-20 19:58:13 +00:00
|
|
|
|