Added Lackadaisy.

This commit is contained in:
Bastian Kleineidam 2013-04-25 21:06:12 +02:00
parent 1ae674782d
commit 6c773e21c7
2 changed files with 23 additions and 2 deletions

View file

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

View file

@ -4,10 +4,30 @@
from re import compile, escape from re import compile, escape
from ..scraper import _BasicScraper from ..scraper import _BasicScraper
from ..helpers import indirectStarter from ..helpers import bounceStarter, indirectStarter
from ..util import tagre from ..util import tagre
class Lackadaisy(_BasicScraper):
description = u'Alcohol-running cats in prohibition St. Louis'
baseUrl = 'http://lackadaisy.foxprints.com/'
url = baseUrl + 'comic.php'
stripUrl = baseUrl + 'comic.php?comicid=%s'
firstStripUrl = stripUrl % '1'
imageSearch = compile(tagre("img", "src", r'(http://www\.lackadaisycats\.com/comic/[^"]*)'))
prevSearch = compile(tagre("a", "href", r"(/comic\.php\?comicid=[0-9]+)") + "< Previous")
help = 'Index format: n'
starter = bounceStarter(url,
compile(tagre("a", "href", r"(/comic.php\?comicid=[0-9]+)") + "Next"))
@classmethod
def namer(cls, imageUrl, pageUrl):
"""Use comic id for filename."""
num = pageUrl.rsplit('=', 1)[-1]
ext = imageUrl.rsplit('.', 1)[-1]
return 'lackadaisy_%s.%s' % (num, ext)
class LasLindas(_BasicScraper): class LasLindas(_BasicScraper):
url = 'http://laslindas.katbox.net/' url = 'http://laslindas.katbox.net/'
rurl = escape(url) rurl = escape(url)