Added TheDreamlandChronicles

This commit is contained in:
Bastian Kleineidam 2013-04-25 21:20:48 +02:00
parent 8418ea471d
commit 382c4c05ad
2 changed files with 22 additions and 1 deletions

View file

@ -2,7 +2,7 @@ Dosage 2.2 (released xx.xx.2013)
Features:
- comic: Added ARedTailsDream, Carciphona, Curtailed, GirlGenius,
Lackadaisy, SabrinaOnline.
Lackadaisy, SabrinaOnline, TheDreamlandChronicles.
Patch by Dirk Reiners
Changes:

View file

@ -29,6 +29,27 @@ class TheDevilsPanties(_BasicScraper):
help = 'Index format: number'
class TheDreamlandChronicles(_BasicScraper):
description = u'The Dreamland Chronicles'
url = 'http://www.thedreamlandchronicles.com/'
stripUrl = url + 'comic/%s/'
firstStripUrl = stripUrl % 'page-1'
rurl = escape(url)
imageSearch = compile(tagre("img", "src", r'(http://cdn\.thedreamlandchronicles\.com/wp-content/uploads/\d+/\d+/\d+-\d+-\d+[^"]*)'))
prevSearch = compile(tagre("a", "href", r'(%s[^"]*)' % rurl, after='navi-prev"'))
help = 'Index format: page-n or chapter-n'
@classmethod
def namer(cls, imageUrl, pageUrl):
"""Remove trailing digit from day number."""
name = imageUrl.split('/')[-1]
base, ext = name.split('.', 1)
bp = base.split('-')
if len(bp[2]) == 3:
bp[2] = bp[2][:-1]
return "%s-%s-%s.%s" % (bp[0], bp[1], bp[2], ext)
class TheNoob(_BasicScraper):
url = 'http://www.thenoobcomic.com/index.php'
stripUrl = url + '?pos=%s'