Added DamnLol

This commit is contained in:
Bastian Kleineidam 2013-04-10 18:19:38 +02:00
parent 5127d4c895
commit 8b99b59056
2 changed files with 23 additions and 1 deletions

View file

@ -1,7 +1,7 @@
Dosage 2.0 (released xx.xx.2013) Dosage 2.0 (released xx.xx.2013)
Features: Features:
- comics: Added ExtraOrdinary, GoblinsComic, RealmOfAtland, Science, - comics: Added DamnLol, ExtraOrdinary, GoblinsComic, RealmOfAtland, Science,
SnowFlakes, StuffNoOneToldMe, WebDesignerCOTW and ZenPencils. SnowFlakes, StuffNoOneToldMe, WebDesignerCOTW and ZenPencils.
- comics: Added the --vote option to vote for popular comics. - comics: Added the --vote option to vote for popular comics.

View file

@ -19,6 +19,28 @@ class DailyDose(_BasicScraper):
help = 'Index format: stripname' help = 'Index format: stripname'
class DamnLol(_BasicScraper):
url = 'http://www.damnlol.com/'
rurl = escape(url)
stripUrl = url + '%s.html'
prevSearch = compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="prev"))
imageSearch = (
compile(tagre("img", "src", r'(%si/[^"]+)' % rurl)),
compile(tagre("img", "src", r'(%spics/[^"]+)' % rurl)),
)
help = 'Index format: stripname-number'
description = 'Funny pictures from the internet. Thousands of them.'
starter = bounceStarter(url,
compile(tagre("a", "href", r'(%s[^"]+)' % rurl, after="next")))
@classmethod
def namer(cls, imageUrl, pageUrl):
ext = imageUrl.rsplit('.', 1)[1]
path = pageUrl.rsplit('/', 1)[1][:-5]
stripname, number = path.rsplit('-', 1)
return '%s-%s.%s' % (number, stripname, ext)
class Damonk(_BasicScraper): class Damonk(_BasicScraper):
url = 'http://www.damonk.com/' url = 'http://www.damonk.com/'
stripUrl = url + 'd/%s.html' stripUrl = url + 'd/%s.html'