From 60ded3226786aa5c2efc36e5667e73d7624ddfd4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 13 Aug 2011 11:19:00 -0600 Subject: [PATCH] Patente de Corso by Oscar Megia Lopez --- recipes/patente_de_corso.recipe | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 recipes/patente_de_corso.recipe diff --git a/recipes/patente_de_corso.recipe b/recipes/patente_de_corso.recipe new file mode 100644 index 0000000000..c6634725f9 --- /dev/null +++ b/recipes/patente_de_corso.recipe @@ -0,0 +1,43 @@ +__license__ = 'GPL v3' +__copyright__ = '2011, Oscar Megia Lopez' +''' +perezreverte.com +''' +import re +from calibre.web.feeds.recipes import BasicNewsRecipe + +class PerezReverte(BasicNewsRecipe): + title = u'Patente de Corso' + __author__ = 'Oscar Megia Lopez' + description = 'Arturo Perez Reverte' + oldest_article = 90 + max_articles_per_feed = 100 + no_stylesheets = True + #delay = 1 + use_embedded_content = False + encoding = 'utf8' + publisher = 'Arturo Perez Reverte' + category = 'Articulo' + language = 'es' + publication_type = 'Magazine' + extra_css = ' body{ font-family: Verdana,Helvetica,Arial,sans-serif } .contentheading{font-weight: bold} .txt_articulo{display: block; padding: 0; border: 1px solid; width: 40%; font-size: small} .story-feature h2{text-align: center; text-transform: uppercase} ' + preprocess_regexps = [(re.compile(r'', re.DOTALL), lambda m: '')] + conversion_options = { + 'comments' : description + ,'tags' : category + ,'language' : language + ,'publisher' : publisher + ,'linearize_tables': True + } + + keep_only_tags = [ + dict(name='h2', attrs={'class':['titular']}), + dict(name='p', attrs={'class':['fecha']}), + dict(name='div', attrs={'class':['bloqueTexto']}) + ] + + remove_attributes = ['width','height'] + + feeds = [ + ('Patente de corso - Web oficial de Arturo Perez Reverte', 'http://www.perezreverte.com/rss/patentes-corso/') + ]