From f587a7e825400a608669c703db85116b79474f15 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 10 Feb 2010 11:09:41 -0700 Subject: [PATCH] Larger images in dilbert download --- resources/recipes/dilbert.recipe | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/recipes/dilbert.recipe b/resources/recipes/dilbert.recipe index ddca52b40a..82966b1d15 100644 --- a/resources/recipes/dilbert.recipe +++ b/resources/recipes/dilbert.recipe @@ -3,6 +3,7 @@ __copyright__ = '2009, Darko Miletic ' ''' http://www.dilbert.com ''' +import re from calibre.web.feeds.recipes import BasicNewsRecipe @@ -28,6 +29,12 @@ class DosisDiarias(BasicNewsRecipe): feeds = [(u'Dilbert', u'http://feeds.dilbert.com/DilbertDailyStrip' )] + preprocess_regexps = [ + (re.compile('strip\..*\.gif', re.DOTALL|re.IGNORECASE), + lambda match: 'strip.zoom.gif') + ] + + def get_article_url(self, article): return article.get('feedburner_origlink', None)