dosage/dosagelib/plugins/r.py

97 lines
3.7 KiB
Python
Raw Normal View History

# -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
2014-01-05 15:50:57 +00:00
# Copyright (C) 2012-2014 Bastian Kleineidam
2012-06-20 19:58:13 +00:00
2013-07-18 18:39:53 +00:00
from re import compile, escape
2012-10-11 10:03:12 +00:00
from ..scraper import _BasicScraper
from ..helpers import bounceStarter
2012-11-21 20:57:26 +00:00
from ..util import tagre
2012-06-20 19:58:13 +00:00
class RadioactivePanda(_BasicScraper):
url = 'http://www.radioactivepanda.com/'
stripUrl = url + 'comic/%s'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'<img src="(/Assets/.*?)".+?"comicimg"')
prevSearch = compile(r'<a href="(/comic/.*?)".+?previous_btn')
help = 'Index format: n (no padding)'
class RealLife(_BasicScraper):
2013-07-18 18:39:53 +00:00
url = 'http://reallifecomics.com/'
rurl = escape(url)
stripUrl = url + 'comic.php?comic=%s'
2013-04-10 21:57:09 +00:00
firstStripUrl = stripUrl % '991115'
2013-07-18 18:39:53 +00:00
imageSearch = compile(tagre("img", "src", r'(%swp-content/uploads/\d+/\d+/[^"]+)' % rurl))
prevSearch = compile(tagre("a", "href", r'((?:%s)?comic\.php\?comic=[^"]+)' % rurl, after="nav-previous"))
help = 'Index format: monthname-dd-yyyy)'
2012-06-20 19:58:13 +00:00
2013-04-09 17:37:47 +00:00
class RealmOfAtland(_BasicScraper):
url = 'http://www.realmofatland.com/'
stripUrl = url + '?p=%s'
firstStripUrl = stripUrl % '1'
prevSearch = compile(tagre("a", "href", r'(\?p=\d+)', after="cg_back"))
imageSearch = compile(tagre("img", "src", r'(images/strips/atland\d+.[^"]+)'))
help = 'Index format: nnn'
2013-03-06 19:21:10 +00:00
class RedMeat(_BasicScraper):
2013-04-13 18:58:00 +00:00
baseUrl = 'http://www.redmeat.com/redmeat/'
url = baseUrl + 'current/index.html'
2014-09-22 20:14:31 +00:00
starter = bounceStarter(url,
compile(tagre("a", "href", r'(http://www\.redmeat\.com/[^"]*)', after="next")))
2013-04-13 18:58:00 +00:00
stripUrl = baseUrl + '%s/index.html'
2013-04-10 21:57:09 +00:00
firstStripUrl = stripUrl % '1996-06-10'
2014-09-22 20:14:31 +00:00
imageSearch = compile(tagre("img", "src", r'(http://www\.redmeat\.com/imager/b/redmeat/[^"]*\.png)'))
prevSearch = compile(tagre("a", "href", r'(http://www\.redmeat\.com/[^"]*)', after="prev"))
2013-03-06 19:21:10 +00:00
help = 'Index format: yyyy-mm-dd'
class RedsPlanet(_BasicScraper):
url = 'http://www.redsplanet.com/comic/'
rurl = escape(url)
stripUrl = url + 'rp/%s/'
firstStripUrl = stripUrl % 'pro/prologue-01'
imageSearch = compile(tagre("img", "src", r'(%scomics/\d+-\d+-\d+_[^"/]+)' % rurl))
prevSearch = compile(tagre("a", "href", r'(%srp/[^"/]+/[^"/]+/)' % rurl))
help = 'Index format: chapter/stripname'
2013-03-06 19:21:10 +00:00
2012-06-20 19:58:13 +00:00
class RedString(_BasicScraper):
url = 'http://www.redstring.strawberrycomics.com/'
stripUrl = url + 'index.php?id=%s'
2013-04-10 21:57:09 +00:00
firstStripUrl = stripUrl % '434'
2012-12-04 06:02:40 +00:00
imageSearch = compile(tagre("img", "src", r'(comics/[^"]+)'))
2012-11-21 20:57:26 +00:00
prevSearch = compile(tagre("a", "href", r'(/index\.php\?id=\d+)', after="prev"))
2012-06-20 19:58:13 +00:00
help = 'Index format: nnn'
class RomanticallyApocalyptic(_BasicScraper):
url = 'http://romanticallyapocalyptic.com/'
rurl = escape(url)
stripUrl = url + '%s/'
firstStripUrl = stripUrl % '1'
imageSearch = compile(tagre("img", "src", r'(%sart/\d+[^"]+)' % rurl))
prevSearch = compile(tagre("a", "href", r'(%s\d+[^"]+)' % rurl)+"\s*"+tagre('span', 'class', 'spritePrevious'))
help = 'Index format: n'
adult = True
2012-06-20 19:58:13 +00:00
class Roza(_BasicScraper):
url = 'http://www.junglestudio.com/roza/index.php'
stripUrl = url + '?date=%s'
2013-04-10 21:57:09 +00:00
firstStripUrl = stripUrl % '2007-05-01'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'<img src="(pages/.+?)"')
prevSearch = compile(r'<a href="(index.php\?date=.+?)">[^>].+?navtable_01.gif')
help = 'Index format: yyyy-mm-dd'
2013-03-12 19:49:46 +00:00
class Ruthe(_BasicScraper):
url = 'http://ruthe.de/'
stripUrl = url + 'index.php?pic=%s&sort=datum&order=ASC'
firstStripUrl = stripUrl % '1'
lang = 'de'
2014-07-31 19:27:49 +00:00
imageSearch = compile(tagre("img", "src", r'(/?cartoons/strip_\d+[^"]+)'))
prevSearch = compile(tagre("a", "href", r'(/cartoon/\d+/datum/asc/)')+'vorheriger')
2013-03-12 19:49:46 +00:00
help = 'Index format: number'