From 614c25e278db30e3280c55b0fcbdc3fe90ead47f Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Sun, 22 Mar 2015 17:13:53 +0100 Subject: [PATCH] Fix coding style. --- dosagelib/plugins/b.py | 40 +++++----------------------------------- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/dosagelib/plugins/b.py b/dosagelib/plugins/b.py index e3d22b187..98810c0ea 100644 --- a/dosagelib/plugins/b.py +++ b/dosagelib/plugins/b.py @@ -68,51 +68,21 @@ class Bearmageddon(_BasicScraper): 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' - ) - ) - ) - + 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' - ) - ) - + 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:] ) + indexes = tuple(pageUrl.rstrip('/').split('/')[-4:]) name = '%s-%s-%s-%s' % indexes name = name + '_' + imageUrl.split( '/' )[-1] return name