~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:56:33 UTC
  • Revision ID: ns@ww1aviationlinks.cjb.net-20091201065633-7j81kj7ma04n3005
S plugin added SailorsunOrg SchoolBites SodiumEyes StrawberryDeathCake and Heard, Sinfest moved out of KeenSpot

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/%s'
9
 
    imageSearch = compile(r'(http://www.octopuspie.com/strippy/.+?)"')
10
 
    prevSearch = compile(r'<a href="(http.+?)".+?Previous<')
11
 
    help = 'Index format: yyyy-mm-dd/n-name/'
12
 
 
13
 
 
14
 
class OddFish(BasicScraper):
15
 
    latestUrl = 'http://www.odd-fish.net/'
16
 
    imageUrl = 'http://www.odd-fish.net/viewing.php?comic_id=%s'
17
 
    imageSearch = compile(r'<img src="(images/.+?)"')
18
 
    prevSearch = compile(r'"(viewing.php.+?)".+?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 OnTheEdge(BasicScraper):
39
 
    latestUrl = 'http://www.ontheedgecomics.com'
40
 
    imageUrl = 'http://www.ontheedgecomics.com/comic/%s'
41
 
    imageSearch = compile(r'ontheedgecomics.com(/comics/.+?)"')
42
 
    prevSearch = compile(r'previous"><a href="http://ontheedgecomics.com(/comic.+?)">&lsaquo; Previous<')
43
 
    help = 'Index format: non'
44
 
 
45
 
 
46
 
class OneQuestion(BasicScraper):
47
 
    latestUrl = 'http://onequestioncomic.com/'
48
 
    imageUrl = 'http://onequestioncomic.com/comics/%s/'
49
 
    imageSearch = compile(r'(istrip_files.+?)"')
50
 
    prevSearch = compile(r'First.+?"(comic.php.+?)".+?previous.png')
51
 
    help = 'Index format: n (unpadded)'
52
 
 
53
 
 
54
 
class OtenbaFiles(BasicScraper):
55
 
    latestUrl = 'http://www.otenba-files.com/main.html'
56
 
    imageUrl = 'http://www.otenba-files.com/%s'
57
 
    imageSearch = compile(r'<img src="(comics/.+?)"')
58
 
    prevSearch = compile(r'href="(\d+.\d+.html)"><img src="Buttons/prev')
59
 
    help = 'Index format: n.nn'
60
 
 
61
 
 
62
 
class OurHomePlanet(BasicScraper):
63
 
    latestUrl = 'http://gdk.gd-kun.net/'
64
 
    imageUrl = 'http://gdk.gd-kun.net/%s.html'
65
 
    imageSearch = compile(r'<img src="(pages/comic.+?)"')
66
 
    prevSearch = compile(r'coords="50,18,95,65".+?href="(.+?\.html)".+?alt=')
67
 
    help = 'Index format: n (unpadded)'
68
 
 
69
 
 
70
 
class OkCancel(BasicScraper):
71
 
    imageUrl = 'http://www.ok-cancel.com/comic/%s.html'
72
 
    imageSearch = compile(r'src="(http://www.ok-cancel.com/strips/okcancel\d{8}.gif)"', IGNORECASE)
73
 
    prevSearch = compile(r'<div class="previous"><a href="(http://www.ok-cancel.com/comic/\d{1,4}.html)">', IGNORECASE)
74
 
    starter = indirectStarter('http://www.ok-cancel.com/', prevSearch)
75
 
    help = 'Index format: yyyymmdd'