From 592480d98b2e028632d45d8639dbd7d708d53711 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 7 Feb 2013 18:07:54 +0530 Subject: [PATCH] Update El Mundo today --- recipes/el_mundo_today.recipe | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/recipes/el_mundo_today.recipe b/recipes/el_mundo_today.recipe index 7f558d10e7..010596b6e5 100644 --- a/recipes/el_mundo_today.recipe +++ b/recipes/el_mundo_today.recipe @@ -3,29 +3,34 @@ from calibre.web.feeds.news import BasicNewsRecipe class ElMundoTodayRecipe(BasicNewsRecipe): title = 'El Mundo Today' - __author__ = 'atordo' - description = u'La actualidad del maƱana' + description = u'La actualidad del ma\u00f1ana' category = 'Noticias, humor' cover_url = 'http://www.elmundotoday.com/wp-content/themes/EarthlyTouch/images/logo.png' - oldest_article = 30 + oldest_article = 15 max_articles_per_feed = 60 auto_cleanup = False no_stylesheets = True remove_javascript = True language = 'es' use_embedded_content = False + publication_type = 'blog' preprocess_regexps = [ (re.compile(r'.*', re.DOTALL), - lambda match: ''), - #(re.compile(r'^\t{5}$'), lambda match: ''), - #(re.compile(r'\t{5}$'), lambda match: ''), - (re.compile(r'
', re.DOTALL), - lambda match: ''), + lambda match: ''), + (re.compile(r''), + lambda match: ''), + (re.compile(r'
.*', re.DOTALL), + lambda match: '') ] keep_only_tags = [ - dict(name='div', attrs={'class':'post-wrapper'}) + dict(name='div', attrs={'class':'post-wrapper '}) + ] + + remove_tags = [ + dict(name='div', attrs={'class':'social4i'}), + dict(name='span', attrs={'class':'num-comentarios'}) ] remove_attributes = [ 'href', 'title', 'alt' ] @@ -36,8 +41,3 @@ class ElMundoTodayRecipe(BasicNewsRecipe): ''' feeds = [('El Mundo Today', 'http://www.elmundotoday.com/feed/')] - - def get_broser(self): - br = BasicNewsRecipe.get_browser(self) - br.set_handle_gzip(True) - return br