~dosage-dev/dosage/test-mode

« back to all changes in this revision

Viewing changes to dosage/plugins/o.py

  • Committer: ns
  • Date: 2009-12-01 06:48:56 UTC
  • Revision ID: ns@ww1aviationlinks.cjb.net-20091201064856-zpr3kzovttos7lns
M plugin added MagicHigh MysteriesOfTheArcana and MysticRevolution

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from re import compile, IGNORECASE
 
2
 
 
3
from dosage.helpers import BasicScraper, indirectStarter
 
4
 
 
5
 
 
6
class OctopusPie(BasicScraper):
 
7
    latestUrl = 'http://www.octopuspie.com/'
 
8
    imageUrl = 'http://www.octopuspie.com/index.php\?date=%s'
 
9
    imageSearch = compile(r'<img src="(strippy/.+?)"')
 
10
    prevSearch = compile(r'<a href="(index.php\?date=.+?)">Prev')
 
11
    help = 'Index format: yyyy-mm-dd'
 
12
 
 
13
 
 
14
class OddFish(BasicScraper):
 
15
    latestUrl = 'http://www.odd-fish.net/'
 
16
    imageUrl = 'http://www.odd-fish.net/index.php\?comic_id=%s'
 
17
    imageSearch = compile(r'"(http://homepage.ntlworld.com/p.blackman/comics/.+?)"')
 
18
    prevSearch = compile(r'First.+?"(index.php\?comic_id=.+?)".+?older')
 
19
    help = 'Index format: n (unpadded)'
 
20
 
 
21
 
 
22
class OhMyGods(BasicScraper):
 
23
    latestUrl = 'http://ohmygods.timerift.net/'
 
24
    imageUrl = 'http://ohmygods.timerift.net/strips/%s.php'
 
25
    imageSearch = compile(r'<\!-- \#BeginEditable "strip" --><img src="((?:strips/\d{4}/\d{2}/)?\d{2}\..+?)" width="\d+" height="\d+" border="\d+">')
 
26
    prevSearch = compile(r'<a href="((?:strips/\d{4}/\d{2}/)?\d{2}\.php)">previous')
 
27
    help = 'Index format: yyyy/mm/dd'
 
28
 
 
29
 
 
30
class OkayPants(BasicScraper):
 
31
    latestUrl = 'http://www.okaypants.com/comic.php'
 
32
    imageUrl = 'http://www.okaypants.com/comic.php?st=%s'
 
33
    imageSearch = compile(r'"(comic/.+?)"')
 
34
    prevSearch = compile(r'"(.+?)".+previous')
 
35
    help = 'Index format: unknown'
 
36
 
 
37
 
 
38
class OtenbaFiles(BasicScraper):
 
39
    latestUrl = 'http://www.otenba-files.com/main.html'
 
40
    imageUrl = 'http://www.otenba-files.com/%s'
 
41
    imageSearch = compile(r'<img src="(comics/.+?)"')
 
42
    prevSearch = compile(r'href="(\d+.\d+.html)"><img src="Buttons/prev')
 
43
    help = 'Index format: n.nn'
 
44
 
 
45
 
 
46
class OurHomePlanet(BasicScraper):
 
47
    latestUrl = 'http://gdk.gd-kun.net/'
 
48
    imageUrl = 'http://gdk.gd-kun.net/%s.html'
 
49
    imageSearch = compile(r'<img src="(pages/comic.+?)"')
 
50
    prevSearch = compile(r'coords="50,18,95,65".+?href="(.+?\.html)".+?alt=')
 
51
    help = 'Index format: n (unpadded)'
 
52
 
 
53
 
 
54
class OkCancel(BasicScraper):
 
55
    imageUrl = 'http://www.ok-cancel.com/comic/%s.html'
 
56
    imageSearch = compile(r'src="(http://www.ok-cancel.com/strips/okcancel\d{8}.gif)"', IGNORECASE)
 
57
    prevSearch = compile(r'<div class="previous"><a href="(http://www.ok-cancel.com/comic/\d{1,4}.html)">', IGNORECASE)
 
58
    starter = indirectStarter('http://www.ok-cancel.com/', prevSearch)
 
59
    help = 'Index format: yyyymmdd'