~dosage-dev/dosage/bunch-of-comics

« back to all changes in this revision

Viewing changes to dosage/plugins/b.py

  • Committer: ns
  • Date: 2009-12-01 07:04:28 UTC
  • Revision ID: ns@ww1aviationlinks.cjb.net-20091201070428-z3xhz72n1ba1kdfm
U plugin added Undertow and UnspeakableVault

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
from re import compile
2
 
 
3
 
from dosage.helpers import BasicScraper
4
 
 
5
 
 
6
 
class BadlyDrawnKitties(BasicScraper):
7
 
    latestUrl = 'http://www.badlydrawnkitties.com/'
8
 
    imageUrl = 'http://www.badlydrawnkitties.com/new/%s.html'
9
 
    imageSearch = compile(r'<img src="(/new/.+?)">')
10
 
    prevSearch = compile(r'"(/new/.+?)".+?previous.gif')
11
 
    help = 'Index format: n (unpadded)'
12
 
 
13
 
 
14
 
class Bardsworth(BasicScraper):
15
 
    latestUrl = 'http://www.bardsworth.com/'
16
 
    imageUrl = 'http://www.bardsworth.com/archive.php?p=s%'
17
 
    imageSearch = compile(r'(strips/.+?)"')
18
 
    prevSearch = compile(r'"(http.+?)".+?/prev')
19
 
    help = 'Index format: nnn'
20
 
 
21
 
 
22
 
class BetterDays(BasicScraper):
23
 
    latestUrl = 'http://www.jaynaylor.com/betterdays/'
24
 
    imageUrl = 'http://www.jaynaylor.com/betterdays/archives/%s'
25
 
    imageSearch = compile(r'<img src=(/betterdays/comic/.+?)>')
26
 
    prevSearch = compile(r'<a href="(.+)">&laquo; Previous')
27
 
    help = 'Index format: yyyy/mm/<your guess>.html'
28
 
 
29
 
 
30
 
class BetterYouThanMe(BasicScraper):
31
 
    latestUrl = 'http://betteryouthanme.net/'
32
 
    imageUrl = 'http://betteryouthanme.net/archive.php?date=%s.gif'
33
 
    imageSearch = compile(r'"(comics/.+?)"')
34
 
    prevSearch = compile(r'"(archive.php\?date=.+?)">.+?previous')
35
 
    help = 'Index format: yyyymmdd'
36
 
 
37
 
 
38
 
class BiggerThanCheeses(BasicScraper):
39
 
    latestUrl = 'http://www.biggercheese.com'
40
 
    imageUrl = 'http://www.biggercheese.com/index.php?comic=%s'
41
 
    imageSearch = compile(r'src="(comics/.+?)" alt')
42
 
    prevSearch = compile(r'"(index.php\?comic=.+?)".+?_back')
43
 
    help = 'Index format: n (unpadded)'
44
 
 
45
 
 
46
 
class BizarreUprising(BasicScraper):
47
 
    latestUrl = 'http://www.bizarreuprising.com/bu.php'
48
 
    imageUrl = 'http://www.bizarreuprising.com/bu.php?strip_id=%s'
49
 
    imageSearch = compile(r'<img src="(img/comics/bu/.+?)"')
50
 
    prevSearch = compile(r'<a href="(\?strip_id=\d+?)"><img src="img/nav/bu_prev.gif"')
51
 
    help = 'Index format: yymmdd'
52
 
 
53
 
 
54
 
class Blip(BasicScraper):
55
 
    latestUrl = 'http://blipcomic.com/'
56
 
    imageUrl = 'http://blipcomic.com/index.php?strip_id=%s'
57
 
    imageSearch = compile(r'(istrip_files/strips/.+?)"')
58
 
    prevSearch = compile(r'First.+?"(index.php\?strip_id=.+?)".+?prev')
59
 
    help = 'Index format: n'
60
 
 
61
 
 
62
 
class BlueCrashKit(BasicScraper):
63
 
    latestUrl = 'http://www.bluecrashkit.com/cheese/'
64
 
    imageUrl = 'http://www.bluecrashkit.com/cheese/node/%s'
65
 
    imageSearch = compile(r'(/cheese/files/comics/.+?)"')
66
 
    prevSearch = compile(r'(/cheese/node/.+?)".+?previous')
67
 
    help = 'Index format: non'
68
 
 
69
 
 
70
 
class BMovieComic(BasicScraper):
71
 
    latestUrl = 'http://www.bmoviecomic.com/'
72
 
    imageUrl = 'http://www.bmoviecomic.com/?cid=%s'
73
 
    imageSearch = compile(r'"(comics/.+?)"')
74
 
    prevSearch = compile(r'(\?cid=.+?)".+?Prev')
75
 
    help = 'Index format: n'
76
 
 
77
 
 
78
 
### With BratHalla there is no 'previous' link at comic 360
79
 
### You will need to use
80
 
### mainline -c BratHalla:360-backup-dad-unstable-plans/
81
 
### to get earlier comics
82
 
class BratHalla(BasicScraper):
83
 
    latestUrl = 'http://brat-halla.com/'
84
 
    imageUrl = 'http://brat-halla.com/comic/%s'
85
 
    imageSearch = compile(r"(/comics/.+?)' target='_blank")
86
 
    prevSearch = compile(r'headernav2".+?"(http.+?)"')
87
 
    help = 'Index format: non'
88
 
 
89
 
 
90
 
class Brink(BasicScraper):
91
 
    latestUrl = 'http://paperfangs.com/brink/'
92
 
    imageUrl = 'http://paperfangs.com/brink/?p=%s'
93
 
    imageSearch = compile(r'/(comics/.+?)"')
94
 
    prevSearch = compile(r'previous.+?/brink/(.+?)".+?Previous')
95
 
    help = 'Index format: non'
96
 
 
97
 
 
98
 
class BrokenMirror(BasicScraper):
99
 
    latestUrl = 'http://www.the-broken-mirror.net/files/story/comic.php'
100
 
    imageUrl = 'http://www.the-broken-mirror.net/files/story/comic.php\?id=%s'
101
 
    imageSearch = compile(r'"(/files/story/.+?)"')
102
 
    prevSearch = compile(r'href="(comic.php\?id=.+?)">&lt;&lt;BACK')
103
 
    help = 'Index format: n'
104
 
 
105
 
 
106
 
class BonoboConspiracy(BasicScraper):
107
 
    latestUrl = 'http://ansuz.sooke.bc.ca/bonobo-conspiracy/'
108
 
    imageUrl = 'http://ansuz.sooke.bc.ca/bonobo-conspiracy/%s'
109
 
    imageSearch = compile(r'<P.+?<IMG SRC="(.+?)" ALT')
110
 
    prevSearch = compile(r'ansuz.+?/(\?i=.+?)".+?Previous')
111
 
    help = 'Index format: nnn'
112
 
 
113
 
 
114
 
class BoredAndEvil(BasicScraper):
115
 
    latestUrl = 'http://www.boredandevil.com/'
116
 
    imageUrl = 'http://www.boredandevil.com/archive.php?date=%s'
117
 
    imageSearch = compile(r'<img src="(strips/.+?)"')
118
 
    prevSearch = compile(r'First Comic.+<a href="(.+?)".+previous-on.gif')
119
 
    help = 'Index format: yyyy-mm-dd'
120
 
 
121
 
 
122
 
class BoyOnAStickAndSlither(BasicScraper):
123
 
    latestUrl = 'http://www.boasas.com/'
124
 
    imageUrl = 'http://www.boasas.com/?c=%s'
125
 
    imageSearch = compile(r'"(boasas/\d+\..+?)"')
126
 
    prevSearch = compile(r'<a href="(.*?)">.*?arrow_left')
127
 
    help = 'Index format: n (unpadded)'
128
 
 
129
 
 
130
 
class ButternutSquash(BasicScraper):
131
 
    latestUrl = 'http://www.butternutsquash.net/assets/pages/bns-current.html'
132
 
    imageUrl = 'http://www.butternutsquash.net/assets/pages/bns-comic%s.html'
133
 
    imageSearch = compile(r'<img src="(\.\./library/.+?)"')
134
 
    prevSearch = compile(r'<area shape="rect" coords="\d+,2\d,13\d,\d+" href="(bns-.+?\.html)" target="_self">')
135
 
    help = 'Index format: nn'
136
 
 
137
 
 
138
 
class Bhag(BasicScraper):
139
 
    basePath = 'http://bhag.sackofjustice.com/'
140
 
    latestUrl = ''
141
 
    prevSearch = compile(r'<a href="(http://bhag\.sackofjustice\.com/daily\.php\?date=\d{6})"><img src="http://bhag.sackofjustice.com/images/previous')
142
 
 
143
 
 
144
 
def blankLabel(name, baseUrl):
145
 
    return BasicScraper.make(
146
 
        name='BlankLabel/' + name,
147
 
        latestUrl=baseUrl,
148
 
        imageUrl='d/%s.html',
149
 
        imageSearch=compile(r'"(/comic[s|/].+?)"'),
150
 
        prevSearch=compile(r'(?:"([^"]*(?:/d/[^"\r\n]*)|(?:/strip/.+?))")(?:(?:.{43}starshift_back.gif)|(?:.+?cxn_previous)|(?:.{43}previous)|(?:[^<>]*>[^<>]*<[^<>]*previous)|(?:.*?back_button)|(?:.*?comicnav-previous))'),
151
 
        help='Index format: yyyymmdd')
152
 
 
153
 
 
154
 
checkerboardNightmare = blankLabel('CheckerboardNightmare', 'http://www.checkerboardnightmare.com/')
155
 
courtingDisaster = blankLabel('CourtingDisaster', 'http://www.courting-disaster.com/')
156
 
evilInc = blankLabel('EvilInc', 'http://www.evil-comic.com/')
157
 
greystoneInn = blankLabel('GreystoneInn', 'http://www.greystoneinn.net/')
158
 
itsWalky = blankLabel('ItsWalky', 'http://www.itswalky.com/')
159
 
# one strip name starts with %20
160
 
#krazyLarry = blankLabel('KrazyLarry', 'http://www.krazylarry.com/')
161
 
melonpool = blankLabel('Melonpool', 'http://www.melonpool.com/')
162
 
# strip names = index.php
163
 
#realLife = blankLabel('RealLife', 'http://www.reallifecomics.com/')
164
 
schlockMercenary = blankLabel('SchlockMercenary', 'http://www.schlockmercenary.com/')
165
 
# hosted on ComicsDotCom
166
 
#sheldon = blankLabel('Sheldon', 'http://www.sheldoncomics.com/')
167
 
shortpacked = blankLabel('Shortpacked', 'http://www.shortpacked.com/')
168
 
starslipCrisis = blankLabel('StarslipCrisis', 'http://www.starslipcrisis.com/')
169
 
uglyHill = blankLabel('UglyHill', 'http://www.uglyhill.com/')
170
 
wapsiSquare = blankLabel('WapsiSquare', 'http://www.wapsisquare.com/')