From f3ecd4f9ec4b43c72a41cfd30494f89adbf39846 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 29 Jan 2011 11:17:19 -0700 Subject: [PATCH] Improve Ledevoir --- resources/recipes/ledevoir.recipe | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/recipes/ledevoir.recipe b/resources/recipes/ledevoir.recipe index c54f21c7ec..bc473be181 100644 --- a/resources/recipes/ledevoir.recipe +++ b/resources/recipes/ledevoir.recipe @@ -9,6 +9,8 @@ __description__ = 'Canadian Paper ' http://www.ledevoir.com/ ''' +import re + from calibre.web.feeds.news import BasicNewsRecipe class ledevoir(BasicNewsRecipe): @@ -32,6 +34,8 @@ class ledevoir(BasicNewsRecipe): remove_javascript = True no_stylesheets = True + preprocess_regexps = [(re.compile(r'(title|alt)=".*?>.*?"', re.DOTALL), lambda m: '')] + keep_only_tags = [ dict(name='div', attrs={'id':'article'}), dict(name='ul', attrs={'id':'ariane'})