From 94004846cd2d5c010959ce447467a6de1c25ec38 Mon Sep 17 00:00:00 2001 From: Serenitas50 Date: Sat, 31 Jan 2015 22:07:35 -0200 Subject: [PATCH] Added comic Beetlebum (http://blog.beetlebum.de/). --- dosagelib/plugins/b.py | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/dosagelib/plugins/b.py b/dosagelib/plugins/b.py index c1f6d1bce..e3d22b187 100644 --- a/dosagelib/plugins/b.py +++ b/dosagelib/plugins/b.py @@ -67,6 +67,57 @@ class Bearmageddon(_BasicScraper): help = 'Index format: yyyy/mm/dd/stripname' +class Beetlebum(_BasicScraper): + + description = u'JoJos Illustrierter Blog' + url = 'http://blog.beetlebum.de/' + rurl = escape(url) + + stripUrl = url + '%s' + firstStripUrl = stripUrl % '2006/03/10/quiz-fur-ruskiphile' + + starter = indirectStarter( + url, + compile( + tagre( + 'a', + 'href', + r'(%s\d{4}/\d{2}/\d{2}/[^"]+)' % rurl, + after='bookmark' + ) + ) + ) + + multipleImagesPerStrip = True + + imageSearch = compile( + tagre( + 'img', + 'src', + r'(http://blog\.beetlebum\.de/wp-content/uploads/[^"]+)' + ) + ) + + prevSearch = compile( + tagre( + 'a', + 'href', + r'(%s\d{4}/\d{2}/\d{2}/[^"]*)' % rurl, + after='prev' + ) + ) + + help = 'Index format: yyyy/mm/dd/striptitle' + lang = 'de' + + @classmethod + def namer(cls, imageUrl, pageUrl): + indexes = tuple( pageUrl.rstrip('/').split('/')[-4:] ) + name = '%s-%s-%s-%s' % indexes + name = name + '_' + imageUrl.split( '/' )[-1] + return name + + class BetterDays(_BasicScraper): description = u'Better Days' url = 'http://jaynaylor.com/betterdays/'