dosage/dosagelib/plugins/e.py

163 lines
6.5 KiB
Python
Raw Normal View History

# -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
2013-02-05 18:51:46 +00:00
# Copyright (C) 2012-2013 Bastian Kleineidam
2012-11-21 20:57:26 +00:00
2012-06-20 19:58:13 +00:00
from re import compile, IGNORECASE
2012-10-11 10:03:12 +00:00
from ..helpers import indirectStarter
from ..scraper import _BasicScraper
from ..util import tagre
2012-06-20 19:58:13 +00:00
2013-03-06 19:21:10 +00:00
class EarthsongSaga(_BasicScraper):
url = 'http://www.earthsongsaga.com/'
starter = indirectStarter(url, compile(tagre("a", "href", r'([^"]+)') + tagre("img", "src", r'[^"]+current\.jpg')))
stripUrl = None
imageSearch = compile(tagre("img", "src", r'((?:\.\./)?images/vol\d+/ch\d+/\d+\.\w+)'))
prevSearch = compile(tagre("a", "href", r'([^"]+)', after="Previous"))
@classmethod
def namer(cls, imageUrl, pageUrl):
imgmatch = compile(r'images/vol(\d+)/ch(\d+)/(\d+)\.\w+$', IGNORECASE).search(imageUrl)
return 'vol%02d_ch%02d_%02d' % (int(imgmatch.group(1)), int(imgmatch.group(2)), int(imgmatch.group(3)))
2012-12-08 20:30:51 +00:00
class EdibleDirt(_BasicScraper):
url = 'http://eddirt.frozenreality.co.uk/'
stripUrl = url + 'index.php?id=%s'
2012-12-08 20:30:51 +00:00
imageSearch = compile(tagre("img", "src", r'(strips/[^"]+)'))
prevSearch = compile(tagre("a", "href", r"(index\.php\?id=\d+)")+"Previous")
help = 'Index format: number'
2012-06-20 19:58:13 +00:00
class EerieCuties(_BasicScraper):
url = 'http://www.eeriecuties.com/'
stripUrl = url + 'strips-ec/%s'
2012-11-21 20:57:26 +00:00
imageSearch = compile(tagre("img", "src", r'(http://ace\.eeriecuties\.com/comics/[^"]+)'))
prevSearch = compile(tagre("a", "href", r'([^"]+)', before="prev"))
help = 'Index format: stripname'
2012-06-20 19:58:13 +00:00
class Eriadan(_BasicScraper):
url = 'http://www.shockdom.com/webcomics/eriadan/'
stripUrl = url + '%s'
2013-03-26 16:34:56 +00:00
multipleImagesPerStrip = True
2013-02-27 18:40:54 +00:00
imageSearch = compile(tagre("img", "src", r'(http://www\.shockdom\.com/webcomics/eriadan/files/[^"]+)', after='width="[68]00"'))
2012-11-21 20:57:26 +00:00
prevSearch = compile(tagre("a", "href", r'([^"]+)', after="prev"))
help = 'Index format: yyyy/mm/dd/nnn (unpadded)'
2012-06-20 19:58:13 +00:00
2012-12-08 20:30:51 +00:00
class ElfOnlyInn(_BasicScraper):
url = 'http://www.elfonlyinn.net/'
stripUrl = url + 'd/%s.html'
2012-12-08 20:30:51 +00:00
imageSearch = compile(tagre("img", "src", r'(/comics/[^"]+)'))
prevSearch = compile(tagre("a", "href", r'(/d/\d+\.html)') +
tagre("img", "src", r'/images/previous_day\.gif'))
help = 'Index format: yyyymmdd'
2012-06-20 19:58:13 +00:00
class ElGoonishShive(_BasicScraper):
name = 'KeenSpot/ElGoonishShive'
url = 'http://www.egscomics.com/'
stripUrl = url + '?date=%s'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r"'(comics/.+?)'")
prevSearch = compile(r"<a href='(/\?date=.+?)'.+?arrow_prev.gif")
help = 'Index format: yyyy-mm-dd'
class ElGoonishShiveNP(_BasicScraper):
name = 'KeenSpot/ElGoonishShiveNP'
url = 'http://www.egscomics.com/egsnp/'
stripUrl = url + '?date=%s'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'<div class=\'comic2\'><img src=\'(comics/\d{4}/\d{2}.+?)\'')
prevSearch = compile(r'<a href=\'(.+?)\'[^>]+?onmouseover=\'\$\("navimg(6|2)"\)')
help = 'Index format: yyyy-mm-dd'
2013-03-06 19:21:10 +00:00
class Ellerbisms(_BasicScraper):
url = 'http://www.ellerbisms.com/'
stripUrl = url + '?p=%s'
imageSearch = compile(tagre("img", "src", r'(http://www\.ellerbisms\.com/comics/[^"]+)'))
prevSearch = compile(tagre("a", "href", r'(http://www\.ellerbisms\.com/[^"]+)', after="prev"))
help = 'Index format: nnn'
2012-06-20 19:58:13 +00:00
class EmergencyExit(_BasicScraper):
url = 'http://www.eecomics.net/'
stripUrl = url + "?strip_id=%s"
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'"(comics/.+?)"')
2012-12-04 06:02:40 +00:00
prevSearch = compile(tagre("a", "href", r'(\?strip_id=\d+)') + tagre("img", "alt", r"Prior"))
help = 'Index format: n'
2012-06-20 19:58:13 +00:00
2012-12-13 20:05:27 +00:00
# XXX disallowed by robots.txt
class _ErrantStory(_BasicScraper):
url = 'http://www.errantstory.com/'
stripUrl = url + '%s'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'<img[^>]+?src="([^"]*?comics/.+?)"')
prevSearch = compile(r'><a href="(.+?)">&lt;Previous</a>')
2012-11-21 20:57:26 +00:00
help = 'Index format: yyyy-mm-dd/num'
2012-06-20 19:58:13 +00:00
class Evercrest(_BasicScraper):
url = 'http://www.evercrest.com/archives/20030308'
2012-11-21 20:57:26 +00:00
stripUrl = 'http://www.evercrest.com/archives/%s'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'<img.+?src="([^"]*/(images/oldstrips|archives/i)/[^"]*)"')
2012-11-21 20:57:26 +00:00
prevSearch = compile(r'<a.+?href="(http://www\.evercrest\.com/archives/\d+)">&lt; Previous')
2012-06-20 19:58:13 +00:00
help = 'Index format: yyyymmdd'
class EverybodyLovesEricRaymond(_BasicScraper):
url = 'http://geekz.co.uk/lovesraymond/'
stripUrl = url + 'archive/%s'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'<img src="((?:http://geekz.co.uk)?/lovesraymond/wp-content(?:/images)/ep\d+\w?\.jpg)"', IGNORECASE)
prevSearch = compile(r'&laquo; <a href="(http://geekz.co.uk/lovesraymond/archive/[^/"]*)">')
help = 'Index format: name-of-old-comic'
class EvilDiva(_BasicScraper):
url = 'http://www.evildivacomics.com/'
stripUrl = url + '?p=%s'
2012-06-20 19:58:13 +00:00
imageSearch = compile(r'(/comics/.+?)"')
prevSearch = compile(r'http.+?com/(.+?)".+?"prev')
2012-11-21 20:57:26 +00:00
help = 'Index format: n (unpadded)'
2012-06-20 19:58:13 +00:00
class EvilInc(_BasicScraper):
url = 'http://www.evil-comic.com/'
stripUrl = url + 'archive/%s.html'
2012-11-21 20:57:26 +00:00
imageSearch = compile(tagre("img", "src", r'(/comics/[^"]+)'))
prevSearch = compile(tagre("a", "href", r'([^"]+)') + tagre("img", "src", r'/images/previous\.gif'))
help = 'Index format: yyyymmdd'
2012-06-20 19:58:13 +00:00
class Exiern(_BasicScraper):
url = 'http://www.exiern.com/'
2013-02-19 19:58:04 +00:00
stripUrl = url + '%s/'
2012-12-04 06:02:40 +00:00
imageSearch = compile(tagre("img", "src", r'(http://www\.exiern\.com/comics/[^"]+)'))
2012-11-21 20:57:26 +00:00
prevSearch = compile(tagre("a", "href", r'(http://www\.exiern\.com/[^"]+)', after="prev"))
2013-02-19 19:58:04 +00:00
help = 'Index format: yyyy/mm/dd/stripname'
2012-06-20 19:58:13 +00:00
2013-03-06 19:21:10 +00:00
class ExploitationNow(_BasicScraper):
url = 'http://www.exploitationnow.com/'
stripUrl = url + '%s'
imageSearch = compile(tagre("img", "src", r'(http://www\.exploitationnow\.com/comics/[^"]+)'))
prevSearch = compile(tagre("a", "href", r'(http://www\.exploitationnow\.com/[^"]+)', after="navi-prev"))
help = 'Index format: yyyy-mm-dd/num'
2012-06-20 19:58:13 +00:00
class ExtraLife(_BasicScraper):
url = 'http://www.myextralife.com/'
stripUrl = url + 'comic/%s/'
2013-04-04 16:30:02 +00:00
imageSearch = compile(tagre("img", "src", r'(http://www\.myextralife\.com/wp-content/uploads/[^"]+)', before="comic"))
prevSearch = compile(tagre("a", "href", r'([^"]+)', before="prev_comic"))
2012-11-21 20:57:26 +00:00
help = 'Index format: stripname'
2012-06-20 19:58:13 +00:00
class EyeOfRamalach(_BasicScraper):
url = 'http://theeye.katbox.net/'
2013-02-19 19:58:04 +00:00
stripUrl = url + 'comic/%s/'
2013-04-04 16:30:02 +00:00
imageSearch = compile(tagre("img", "src", r'(http://theeye\.katbox\.net/wp-content/uploads/[^"]+)', after="data-webcomic-parent"))
2013-02-12 20:14:44 +00:00
prevSearch = compile(tagre("a", "href", r'(http://theeye\.katbox\.net/comic/[^"]+)', after="previous"))
2013-02-19 19:58:04 +00:00
help = 'Index format: stripname'