2012-06-20 20:41:04 +00:00
|
|
|
# -*- coding: iso-8859-1 -*-
|
|
|
|
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
|
2012-11-21 20:57:26 +00:00
|
|
|
# Copyright (C) 2012 Bastian Kleineidam
|
|
|
|
|
2012-11-19 20:20:34 +00:00
|
|
|
from re import compile
|
2012-06-20 19:58:13 +00:00
|
|
|
|
2012-10-11 10:03:12 +00:00
|
|
|
from ..scraper import _BasicScraper
|
2012-11-21 20:57:26 +00:00
|
|
|
from ..helpers import indirectStarter
|
2012-12-04 06:02:40 +00:00
|
|
|
from ..util import tagre
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2012-12-07 23:45:18 +00:00
|
|
|
class DailyDose(_BasicScraper):
|
|
|
|
baseUrl = 'http://dailydoseofcomics.com/'
|
|
|
|
starter = indirectStarter(baseUrl,
|
|
|
|
compile(tagre("a", "href", r'(http://dailydoseofcomics\.com/[^"]+)', after="preview")))
|
|
|
|
stripUrl = baseUrl + '%s/'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'([^"]+)', before="align(?:none|center)"))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://dailydoseofcomics\.com/[^"]+)', after="prev"))
|
|
|
|
help = 'Index format: stripname'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2012-12-08 20:30:51 +00:00
|
|
|
class Damonk(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.damonk.com/'
|
|
|
|
stripUrl = latestUrl + 'd/%s.html'
|
|
|
|
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-12-13 20:05:27 +00:00
|
|
|
# XXX disallowed /search by robots.txt
|
|
|
|
class _DandyAndCompany(_BasicScraper):
|
2012-06-20 19:58:13 +00:00
|
|
|
latestUrl = 'http://www.dandyandcompany.com/'
|
2012-12-04 06:02:40 +00:00
|
|
|
stripUrl = None
|
|
|
|
multipleImagesPerStrip = True
|
|
|
|
imageSearch = compile(tagre("a", "href", r'(http://\d+\.bp\.blogspot\.com/[^"]+)', after="imageanchor"))
|
|
|
|
prevSearch = compile(tagre("a", "href", r"([^']+)", quote="'", after="Older Posts"))
|
|
|
|
help = 'Index format: none'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
class DarkWings(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.flowerlarkstudios.com/dark-wings/'
|
2012-11-21 20:57:26 +00:00
|
|
|
stripUrl = latestUrl + '%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.flowerlarkstudios\.com/dark-wings/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://www\.flowerlarkstudios\.com/dark-wings/[^"]+)', after="navi-prev"))
|
|
|
|
help = 'Index format: yyyy/mm/dd/page-nn-mm'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
class DeathToTheExtremist(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.dtecomic.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + '?n=%s'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'"(comics/.*?)"')
|
|
|
|
prevSearch = compile(r'</a> <a href="(\?n=.*?)"><.+?/aprev.gif"')
|
|
|
|
help = 'Index format: nnn'
|
|
|
|
|
|
|
|
|
|
|
|
class DeepFried(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.whatisdeepfried.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + '%s'
|
2012-11-21 20:57:26 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.whatisdeepfried\.com/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://www\.whatisdeepfried\.com/[^"]+)', after="prev"))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: non'
|
|
|
|
|
|
|
|
|
2012-12-07 23:45:18 +00:00
|
|
|
class DMFA(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.missmab.com/'
|
|
|
|
stripUrl = latestUrl + 'Comics/Vol_%s.php'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'((?:Comics/|Vol)[^"]+)'))
|
|
|
|
multipleImagesPerStrip = True
|
|
|
|
prevSearch = compile(tagre("a", "href", r'((?:Comics/)?Vol[^"]+)')+
|
|
|
|
tagre("img", "src", r'(?:../)?Images/comicprev\.gif'))
|
|
|
|
help = 'Index format: nnn (normally, some specials)'
|
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class DoemainOfOurOwn(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.doemain.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'index.cgi/%s'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r"<img border='0' width='\d+' height='\d+' src='(/strips/\d{4}/\d{6}-[^\']+)'")
|
|
|
|
prevSearch = compile(r'<a href="(/index\.cgi/\d{4}-\d{2}-\d{2})"><img width="\d+" height="\d+" border="\d+" alt="Previous Strip"')
|
|
|
|
help = 'Index format: yyyy-mm-dd'
|
|
|
|
|
|
|
|
|
|
|
|
class DrFun(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.ibiblio.org/Dave/ar00502.htm'
|
2012-11-13 18:10:19 +00:00
|
|
|
stripUrl = 'http://www.ibiblio.org/Dave/ar%s.htm'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'<A HREF= "(Dr-Fun/df\d{6}/df.+?)">')
|
2012-12-04 06:02:40 +00:00
|
|
|
multipleImagesPerStrip = True
|
2012-06-20 19:58:13 +00:00
|
|
|
prevSearch = compile(r'<A HREF="(.+?)">Previous Week,')
|
|
|
|
help = 'Index format: nnnnn'
|
|
|
|
|
|
|
|
|
|
|
|
class Dracula(_BasicScraper):
|
|
|
|
latestUrl = 'http://draculacomic.net/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'comic.php?comicID=%s'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(comics/[^"]+)'))
|
2012-06-20 19:58:13 +00:00
|
|
|
prevSearch = compile(r' <a class="archivelink" href="(.+?)">« Prev</a>')
|
|
|
|
help = 'Index format: nnn'
|
|
|
|
|
|
|
|
|
|
|
|
class DragonTails(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.dragon-tails.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'archive.php?date=%s'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'"(newcomic/.+?)"')
|
|
|
|
prevSearch = compile(r'"(archive.+?)">.+n_2')
|
|
|
|
help = 'Index format: yyyy-mm-dd'
|
|
|
|
|
|
|
|
|
|
|
|
class DreamKeepersPrelude(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.dreamkeeperscomic.com/Prelude.php'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + '?pg=%s'
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'(images/PreludeNew/.+?)"')
|
|
|
|
prevSearch = compile(r'(Prelude.php\?pg=.+?)"')
|
|
|
|
help = 'Index format: n'
|
|
|
|
|
|
|
|
|
|
|
|
class Drowtales(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.drowtales.com/mainarchive.php'
|
2012-11-21 20:57:26 +00:00
|
|
|
stripUrl = latestUrl + '?sid=%s'
|
2012-12-04 06:02:40 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.drowtales\.com/mainarchive/[^"]+)'))
|
2012-11-21 20:57:26 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(\?sid=\d+)', before="link_prev_top"))
|
|
|
|
help = 'Index format: number'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
class DieselSweeties(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.dieselsweeties.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'archive/%s'
|
2012-11-21 20:57:26 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(/hstrips/[^"]+)'))
|
2012-12-04 06:02:40 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(/archive/\d+)') +
|
|
|
|
tagre("img", "src", r'(?:http://www\.dieselsweeties\.com/ximages/blackbackarrow160.png|/ximages/prev\.gif)'))
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: n (unpadded)'
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def namer(cls, imageUrl, pageUrl):
|
|
|
|
index = int(imageUrl.split('/')[-1].split('.')[0])
|
|
|
|
return 'sw%02d' % (index,)
|
|
|
|
|
|
|
|
|
|
|
|
class DominicDeegan(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.dominic-deegan.com/'
|
2012-11-20 17:53:53 +00:00
|
|
|
stripUrl = latestUrl + 'view.php?date=%s'
|
2012-12-04 06:02:40 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(comics/\d+\.gif)'))
|
2012-12-08 20:30:51 +00:00
|
|
|
prevSearch = compile(r'"(view.php\?date=[^"]+)".+?prev21')
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: yyyy-mm-dd'
|
|
|
|
|
|
|
|
|
|
|
|
class DorkTower(_BasicScraper):
|
|
|
|
latestUrl = 'http://www.dorktower.com/'
|
2012-11-21 20:57:26 +00:00
|
|
|
stripUrl = latestUrl + '%s/'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://www\.dorktower\.com/files/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(http://www\.dorktower\.com/[^"]+)')+"Previous")
|
|
|
|
help = 'Index format: yyyy/mm/dd/stripname-dd-mm-yy'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
class DresdenCodak(_BasicScraper):
|
|
|
|
latestUrl = 'http://dresdencodak.com/'
|
2012-11-13 18:10:19 +00:00
|
|
|
stripUrl = None
|
2012-06-20 19:58:13 +00:00
|
|
|
imageSearch = compile(r'<img src="http://dresdencodak.com(/comics/.*?\.jpg)"')
|
|
|
|
prevSearch = compile(r'<a href="http://dresdencodak.com(/.*?)"><img src=http://dresdencodak.com/m_prev.png>')
|
|
|
|
starter = indirectStarter('http://dresdencodak.com/', compile(r'<div id="preview"><a href="http://dresdencodak.com/(\d+/\d+/\d+/.*?)">'))
|
|
|
|
|
2012-11-26 06:13:32 +00:00
|
|
|
|
2012-11-28 17:15:12 +00:00
|
|
|
class Dilbert(_BasicScraper):
|
|
|
|
latestUrl = 'http://dilbert.com/'
|
|
|
|
stripUrl = latestUrl + '%s/'
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(/\d+-\d+-\d+/)', after="STR_Prev"))
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(/dyn/str_strip/[^"]+\.strip\.zoom\.gif)'))
|
|
|
|
help = 'Index format: yyyy-mm-dd'
|
|
|
|
# XXX namer
|