2016-03-16 23:44:06 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2016-10-28 22:21:41 +00:00
|
|
|
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
|
2014-01-05 15:50:57 +00:00
|
|
|
# Copyright (C) 2012-2014 Bastian Kleineidam
|
2017-02-12 01:16:38 +00:00
|
|
|
# Copyright (C) 2015-2017 Tobias Gruetzmacher
|
2012-11-21 20:57:26 +00:00
|
|
|
|
2016-04-10 21:04:34 +00:00
|
|
|
from __future__ import absolute_import, division, print_function
|
|
|
|
|
2013-04-10 16:19:11 +00:00
|
|
|
from re import compile, escape
|
2012-06-20 19:58:13 +00:00
|
|
|
|
2015-04-26 10:32:52 +00:00
|
|
|
from ..scraper import _BasicScraper, _ParserScraper
|
2017-02-13 21:41:17 +00:00
|
|
|
from ..helpers import indirectStarter, bounceStarter, xpath_class
|
2012-12-04 06:02:40 +00:00
|
|
|
from ..util import tagre
|
2017-02-13 21:41:17 +00:00
|
|
|
from .common import _WordPressScraper
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2016-04-29 22:44:18 +00:00
|
|
|
class DamnLol(_ParserScraper):
|
2013-04-10 16:19:38 +00:00
|
|
|
url = 'http://www.damnlol.com/'
|
2016-09-29 22:15:45 +00:00
|
|
|
# Classes for next and previous seem to be swapped...
|
|
|
|
prevSearch = '//a[%s]' % xpath_class("next")
|
|
|
|
nextSearch = '//a[%s]' % xpath_class("previous")
|
|
|
|
imageSearch = '//img[@id="post-image"]'
|
2016-04-13 18:01:51 +00:00
|
|
|
starter = bounceStarter
|
2013-04-10 16:19:38 +00:00
|
|
|
|
2016-04-21 06:20:49 +00:00
|
|
|
def namer(self, image_url, page_url):
|
|
|
|
ext = image_url.rsplit('.', 1)[1]
|
|
|
|
path = page_url.rsplit('/', 1)[1][:-5]
|
2013-04-10 16:19:38 +00:00
|
|
|
stripname, number = path.rsplit('-', 1)
|
|
|
|
return '%s-%s.%s' % (number, stripname, ext)
|
|
|
|
|
|
|
|
|
2012-12-08 20:30:51 +00:00
|
|
|
class Damonk(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.damonk.com/'
|
|
|
|
stripUrl = url + 'd/%s.html'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '20060522'
|
2012-12-08 20:30:51 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(/d/\d+\.html)') +
|
2016-04-10 21:04:34 +00:00
|
|
|
tagre("img", "src", r'/images/previous_day\.gif'))
|
2012-12-08 20:30:51 +00:00
|
|
|
help = 'Index format: yyyymmdd'
|
|
|
|
|
|
|
|
|
2013-03-03 20:31:44 +00:00
|
|
|
class DangerouslyChloe(_BasicScraper):
|
|
|
|
url = 'http://www.dangerouslychloe.com/'
|
|
|
|
stripUrl = url + 'strips-dc/%s'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % 'chapter_1_-_that_damned_girl'
|
2013-03-03 20:31:44 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'([^"]*/comics/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'([^"]*/strips-dc/[^"]+)', before="cn[id]prevt"))
|
|
|
|
help = 'Index format: name'
|
|
|
|
|
|
|
|
|
2013-08-19 17:18:02 +00:00
|
|
|
class DarthsAndDroids(_BasicScraper):
|
|
|
|
url = 'http://www.darthsanddroids.net/'
|
|
|
|
stripUrl = url + 'episodes/%s.html'
|
|
|
|
firstStripUrl = stripUrl % '0001'
|
2016-04-10 21:04:34 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(/episodes/\d\d\d\d.html)') +
|
|
|
|
'<PREVIOUS')
|
2013-08-19 17:18:02 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(/comics/darths\d\d\d\d\.jpg)'))
|
|
|
|
|
|
|
|
|
2016-04-10 21:04:34 +00:00
|
|
|
class DasLebenIstKeinPonyhof(_WordPressScraper):
|
2013-03-21 17:33:16 +00:00
|
|
|
url = 'http://sarahburrini.com/wordpress/'
|
2016-04-10 21:04:34 +00:00
|
|
|
firstStripUrl = url + 'comic/mein-erster-webcomic/'
|
2013-04-04 16:30:02 +00:00
|
|
|
multipleImagesPerStrip = True
|
2013-03-21 17:33:16 +00:00
|
|
|
lang = 'de'
|
|
|
|
|
|
|
|
|
2013-03-06 19:00:30 +00:00
|
|
|
class DeadWinter(_BasicScraper):
|
|
|
|
url = 'http://deadwinter.cc/'
|
|
|
|
stripUrl = url + 'page/%s'
|
|
|
|
firstStripUrl = stripUrl % '1'
|
|
|
|
imageSearch = compile(tagre("img", "src", r"(/static/page/strip/\d+[^']+)", quote="'"))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(/page/\d+)') + "Previous")
|
|
|
|
help = 'Index format: number'
|
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class DeepFried(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.whatisdeepfried.com/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-04-10 21:57:09 +00:00
|
|
|
stripUrl = url + '%s/'
|
|
|
|
firstStripUrl = stripUrl % '2001/09/16/new-world-out-of-order'
|
2013-04-10 16:19:11 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(%scomics/[^"]+)' % rurl))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="prev"))
|
2013-04-10 21:57:09 +00:00
|
|
|
help = 'Index format: none'
|
2012-06-20 19:58:13 +00:00
|
|
|
|
|
|
|
|
2015-05-26 10:59:25 +00:00
|
|
|
class DemolitionSquad(_ParserScraper):
|
2013-03-19 19:45:59 +00:00
|
|
|
url = 'http://www.demolitionsquad.de/'
|
2014-01-20 18:01:47 +00:00
|
|
|
stripUrl = url + '?comicbeitrag=%s'
|
|
|
|
firstStripUrl = stripUrl % '181'
|
2015-05-26 10:59:25 +00:00
|
|
|
imageSearch = '//img[contains(@src,"uploads/pics/")]'
|
|
|
|
prevSearch = '//img[@name="zuruck"]/..'
|
2014-01-20 18:01:47 +00:00
|
|
|
help = 'Index format: number'
|
2013-03-19 19:45:59 +00:00
|
|
|
lang = 'de'
|
|
|
|
|
|
|
|
|
2016-04-29 22:44:18 +00:00
|
|
|
class DerTodUndDasMaedchen(_ParserScraper):
|
2013-03-21 17:33:16 +00:00
|
|
|
url = 'http://www.cartoontomb.de/deutsch/tod2.php'
|
|
|
|
stripUrl = url + '?bild=%s.jpg'
|
|
|
|
firstStripUrl = stripUrl % '00_01_01'
|
2016-04-29 22:44:18 +00:00
|
|
|
imageSearch = '//img[contains(@src, "images/tod/teil2")]'
|
|
|
|
prevSearch = u'//a[text()="zur\u00FCck"]'
|
2013-03-21 17:33:16 +00:00
|
|
|
help = 'Index format: nn_nn_nn'
|
|
|
|
lang = 'de'
|
|
|
|
|
|
|
|
|
2014-02-18 20:00:19 +00:00
|
|
|
class DieFruehreifen(_BasicScraper):
|
|
|
|
url = 'http://www.die-fruehreifen.de/index.php'
|
|
|
|
stripUrl = url + '?id=%s&order=DESC'
|
|
|
|
firstStripUrl = stripUrl % '1'
|
2014-07-31 19:18:15 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'([^"]*/strips/[Ff]rueh_?[Ss]trip_\d+.jpg)'))
|
2016-04-10 21:04:34 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r"(index\.php\?id=\d+&order=DESC)") +
|
|
|
|
tagre("img", "id", r"naechster"))
|
2014-02-18 20:00:19 +00:00
|
|
|
help = 'Index format: n (unpadded)'
|
|
|
|
lang = 'de'
|
|
|
|
|
|
|
|
|
2016-04-29 22:44:18 +00:00
|
|
|
class DieselSweeties(_ParserScraper):
|
2016-05-05 08:12:03 +00:00
|
|
|
url = 'http://dieselsweeties.com/'
|
2016-09-29 22:15:45 +00:00
|
|
|
stripUrl = url + 'ics/%s'
|
2016-04-29 22:44:18 +00:00
|
|
|
firstStripUrl = stripUrl % '1'
|
|
|
|
imageSearch = '//img[@class="xomic"]'
|
|
|
|
prevSearch = '//div[@id="prev"]//a[contains(text(), "previous")]'
|
2016-05-16 21:16:29 +00:00
|
|
|
latestSearch = prevSearch
|
|
|
|
starter = indirectStarter
|
2016-04-29 22:44:18 +00:00
|
|
|
help = 'Index format: n (unpadded)'
|
|
|
|
|
|
|
|
|
|
|
|
class DieselSweetiesOld(_ParserScraper):
|
2016-05-05 08:12:03 +00:00
|
|
|
url = 'http://dieselsweeties.com/archive/'
|
2016-04-29 22:44:18 +00:00
|
|
|
stripUrl = url + '%s'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '1'
|
2016-04-29 22:44:18 +00:00
|
|
|
imageSearch = '//img[contains(@src, "/hstrips/")]'
|
|
|
|
prevSearch = '//a[contains(@title, "previous")]'
|
2013-03-06 19:21:10 +00:00
|
|
|
help = 'Index format: n (unpadded)'
|
2016-04-29 22:44:18 +00:00
|
|
|
endOfLife = True
|
|
|
|
|
|
|
|
def starter(self):
|
|
|
|
return self.stripUrl % '4000'
|
2013-03-06 19:21:10 +00:00
|
|
|
|
2016-04-21 06:20:49 +00:00
|
|
|
def namer(self, image_url, page_url):
|
|
|
|
index = int(image_url.split('/')[-1].split('.')[0])
|
|
|
|
return 'sw%02d' % index
|
2013-03-06 19:21:10 +00:00
|
|
|
|
|
|
|
|
2016-05-15 23:21:23 +00:00
|
|
|
class Dilbert(_ParserScraper):
|
2013-03-06 19:21:10 +00:00
|
|
|
url = 'http://dilbert.com/'
|
2016-05-05 08:12:03 +00:00
|
|
|
stripUrl = url + 'strip/%s'
|
2013-03-19 19:45:18 +00:00
|
|
|
firstStripUrl = stripUrl % '1989-04-16'
|
2016-04-13 18:01:51 +00:00
|
|
|
starter = indirectStarter
|
2016-05-15 23:21:23 +00:00
|
|
|
prevSearch = '//div[%s]/a' % xpath_class('nav-left')
|
|
|
|
imageSearch = '//img[%s]' % xpath_class('img-comic')
|
|
|
|
latestSearch = '//a[@class="img-comic-link"]'
|
2013-03-06 19:21:10 +00:00
|
|
|
help = 'Index format: yyyy-mm-dd'
|
2013-03-06 19:21:20 +00:00
|
|
|
|
2016-04-21 06:20:49 +00:00
|
|
|
def namer(self, image_url, page_url):
|
|
|
|
name = page_url.rsplit("/", 1)[1]
|
2015-01-16 18:05:53 +00:00
|
|
|
return "%s" % name
|
2013-03-06 19:21:10 +00:00
|
|
|
|
|
|
|
|
2012-12-07 23:45:18 +00:00
|
|
|
class DMFA(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.missmab.com/'
|
|
|
|
stripUrl = url + 'Comics/Vol_%s.php'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '001'
|
2012-12-07 23:45:18 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'((?:Comics/|Vol)[^"]+)'))
|
|
|
|
multipleImagesPerStrip = True
|
2016-04-10 21:04:34 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'((?:Comics/)?Vol[^"]+)') +
|
|
|
|
tagre("img", "src", r'(?:../)?Images/comicprev\.gif'))
|
2012-12-07 23:45:18 +00:00
|
|
|
help = 'Index format: nnn (normally, some specials)'
|
|
|
|
|
|
|
|
|
2016-10-31 05:57:47 +00:00
|
|
|
class DoemainOfOurOwn(_ParserScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.doemain.com/'
|
|
|
|
stripUrl = url + 'index.cgi/%s'
|
2016-10-31 05:57:47 +00:00
|
|
|
imageSearch = '//td/img[contains(@src, "/strips/")]'
|
|
|
|
prevSearch = '//a[img[@alt="Previous Strip"]]'
|
|
|
|
endOfLife = True
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: yyyy-mm-dd'
|
|
|
|
|
|
|
|
|
2013-03-15 06:04:19 +00:00
|
|
|
class DogHouseDiaries(_BasicScraper):
|
|
|
|
url = 'http://thedoghousediaries.com/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-03-15 06:04:19 +00:00
|
|
|
stripUrl = url + '%s'
|
2015-04-15 16:51:45 +00:00
|
|
|
firstStripUrl = stripUrl % '34'
|
|
|
|
prevSearch = compile(r"<a id='previouslink' href='(http://thedoghousediaries.com/\d+)'")
|
2015-04-15 16:56:03 +00:00
|
|
|
imageSearch = compile(r"<img src='(dhdcomics/[^']+)'")
|
2013-03-15 06:04:19 +00:00
|
|
|
help = 'Index format: number'
|
|
|
|
|
|
|
|
|
2013-03-06 19:21:10 +00:00
|
|
|
class DominicDeegan(_BasicScraper):
|
|
|
|
url = 'http://www.dominic-deegan.com/'
|
|
|
|
stripUrl = url + 'view.php?date=%s'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '2002-05-21'
|
2013-03-06 19:21:10 +00:00
|
|
|
imageSearch = compile(tagre("img", "src", r'(comics/[^"]+)'))
|
|
|
|
prevSearch = compile(r'"(view.php\?date=[^"]+)".+?prev21')
|
|
|
|
help = 'Index format: yyyy-mm-dd'
|
|
|
|
|
|
|
|
|
2016-10-31 05:57:47 +00:00
|
|
|
class DorkTower(_ParserScraper):
|
2013-03-06 19:21:10 +00:00
|
|
|
url = 'http://www.dorktower.com/'
|
2016-10-31 05:57:47 +00:00
|
|
|
firstStripUrl = url + '1997/01/01/shadis-magazine-strip-1/'
|
|
|
|
imageSearch = '//div[%s]//a/img' % xpath_class('entry-content')
|
|
|
|
prevSearch = '//a[%s][text()="Previous"]' % xpath_class('btn')
|
2013-03-06 19:21:10 +00:00
|
|
|
|
|
|
|
|
2012-06-20 19:58:13 +00:00
|
|
|
class Dracula(_BasicScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://draculacomic.net/'
|
|
|
|
stripUrl = url + 'comic.php?comicID=%s'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '0'
|
2012-11-20 17:53:53 +00:00
|
|
|
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'
|
|
|
|
|
|
|
|
|
2016-09-29 22:15:45 +00:00
|
|
|
class DreamKeepersPrelude(_ParserScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://www.dreamkeeperscomic.com/Prelude.php'
|
|
|
|
stripUrl = url + '?pg=%s'
|
2016-09-29 22:15:45 +00:00
|
|
|
imageSearch = '//div[@class="Preludecomic"]/table//a/img'
|
|
|
|
prevSearch = '//a[@id="prev"]'
|
2012-06-20 19:58:13 +00:00
|
|
|
help = 'Index format: n'
|
|
|
|
|
|
|
|
|
2017-02-12 01:16:38 +00:00
|
|
|
class DresdenCodak(_ParserScraper):
|
2013-02-04 20:00:26 +00:00
|
|
|
url = 'http://dresdencodak.com/'
|
2017-02-12 01:16:38 +00:00
|
|
|
startUrl = url + 'cat/comic/'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = url + '2007/02/08/pom/'
|
2017-02-12 01:16:38 +00:00
|
|
|
imageSearch = '//section[%s]//img' % xpath_class('entry-content')
|
|
|
|
prevSearch = '//a[@rel="prev"]'
|
|
|
|
latestSearch = '//a[%s]' % xpath_class('tc-grid-bg-link')
|
2016-04-13 18:01:51 +00:00
|
|
|
starter = indirectStarter
|
2012-06-20 19:58:13 +00:00
|
|
|
|
2017-02-12 01:16:38 +00:00
|
|
|
# Blog and comic are mixed...
|
|
|
|
def shouldSkipUrl(self, url, data):
|
|
|
|
return not data.xpath(self.imageSearch)
|
|
|
|
|
2012-11-26 06:13:32 +00:00
|
|
|
|
2013-04-10 21:57:09 +00:00
|
|
|
class DrFun(_BasicScraper):
|
2013-04-13 18:58:00 +00:00
|
|
|
baseUrl = 'http://www.ibiblio.org/Dave/'
|
|
|
|
url = baseUrl + 'ar00502.htm'
|
|
|
|
stripUrl = baseUrl + 'ar%s.htm'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '00001'
|
|
|
|
imageSearch = compile(tagre("a", "href", r'(Dr-Fun/df\d+/df[^"]+)'))
|
|
|
|
multipleImagesPerStrip = True
|
|
|
|
prevSearch = compile(tagre("a", "href", r'([^"]+)') + 'Previous Week,')
|
|
|
|
help = 'Index format: nnnnn'
|
2013-04-29 18:29:56 +00:00
|
|
|
endOfLife = True
|
2013-04-10 21:57:09 +00:00
|
|
|
|
|
|
|
|
2015-01-26 09:21:24 +00:00
|
|
|
class Drive(_BasicScraper):
|
|
|
|
url = 'http://www.drivecomic.com/'
|
|
|
|
rurl = escape(url)
|
|
|
|
stripUrl = url + 'archive/%s.html'
|
|
|
|
firstStripUrl = stripUrl % '090815'
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(http://cdn\.drivecomic\.com/strips/main/[^"]+)'))
|
|
|
|
prevSearch = compile(tagre("a", "href", r'(%sarchive/\d+\.html)' % rurl) + "Previous")
|
|
|
|
help = 'Index format: yymmdd'
|
|
|
|
|
|
|
|
|
2015-07-17 23:21:29 +00:00
|
|
|
class DrMcNinja(_ParserScraper):
|
2013-03-25 18:47:44 +00:00
|
|
|
url = 'http://drmcninja.com/'
|
|
|
|
stripUrl = url + 'archives/comic/%s/'
|
|
|
|
firstStripUrl = stripUrl % '0p1'
|
2015-07-17 23:21:29 +00:00
|
|
|
css = True
|
|
|
|
imageSearch = 'div#comic img'
|
|
|
|
prevSearch = 'a.prev'
|
|
|
|
help = 'Index format: {episode}p{page}'
|
2013-03-25 18:47:44 +00:00
|
|
|
|
|
|
|
|
2013-03-06 19:21:10 +00:00
|
|
|
class Drowtales(_BasicScraper):
|
2013-04-13 18:58:00 +00:00
|
|
|
baseUrl = 'http://www.drowtales.com/'
|
|
|
|
rurl = escape(baseUrl)
|
|
|
|
url = baseUrl + 'mainarchive.php'
|
2013-03-06 19:21:10 +00:00
|
|
|
stripUrl = url + '?sid=%s'
|
2013-04-10 21:57:09 +00:00
|
|
|
firstStripUrl = stripUrl % '4192'
|
2013-04-11 16:27:43 +00:00
|
|
|
imageSearch = (
|
|
|
|
compile(tagre("img", "src", r'(%smainarchive/[^"]+)' % rurl)),
|
|
|
|
compile(r'background-image:url\((mainarchive/[^\)]+center\.jpg)'),
|
|
|
|
)
|
2013-03-06 19:21:10 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(\?sid=\d+)', before="link_prev_top"))
|
|
|
|
help = 'Index format: number'
|
2013-02-06 21:08:36 +00:00
|
|
|
|
|
|
|
|
2015-07-17 23:21:29 +00:00
|
|
|
class DumbingOfAge(_BasicScraper):
|
2013-02-06 21:08:36 +00:00
|
|
|
url = 'http://www.dumbingofage.com/'
|
2013-04-10 16:19:11 +00:00
|
|
|
rurl = escape(url)
|
2013-02-06 21:08:36 +00:00
|
|
|
stripUrl = url + '%s/'
|
2013-04-10 16:19:11 +00:00
|
|
|
prevSearch = compile(tagre("a", "href", r'(%s\d+/[^"]+)' % rurl, after="prev"))
|
|
|
|
imageSearch = compile(tagre("img", "src", r'(%scomics/\d+-\d+-\d+[^"]+)' % rurl))
|
2013-02-06 21:08:36 +00:00
|
|
|
help = 'Index format: yyyy/comic/book-num/seriesname/stripname'
|