From e9dbc23909c4914d6ca9d6c64aea22b508f760fb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 29 Aug 2016 07:42:56 +0530 Subject: [PATCH] Contropiano by michele --- recipes/contropiano.recipe | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 recipes/contropiano.recipe diff --git a/recipes/contropiano.recipe b/recipes/contropiano.recipe new file mode 100644 index 0000000000..2dc0fb16a5 --- /dev/null +++ b/recipes/contropiano.recipe @@ -0,0 +1,50 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class AdvancedUserRecipe(BasicNewsRecipe): + title = u'Contropiano' + oldest_article = 7 + max_articles_per_feed = 25 + language = 'it' + __author__ = 'michele' + + remove_javascript = True + no_stylesheets = True + use_embedded_content = False + remove_empty_feeds = True + + keep_only_tags = [ + dict(name='div', attrs={'class': ['category-archive single']}), + dict(name='div', attrs={'class': ['content-post']}) + ] + + remove_tags = [ + dict(name='span', attrs={'id': ['postviews']}), + dict(name='div', attrs={'class': ['social-share']}), + dict(name='p', attrs={'class': ['firma-redazione']}) + ] + + remove_tags_after = dict(name='p', attrs={'class': ['firma-redazione']}) + + feeds = [ + (u'Politica', + u'http://contropiano.org/news/politica-news/feed'), + (u'Internazionale', + u'http://contropiano.org/news/internazionale-news/feed'), + (u'Aggiornamenti in breve', u'http://contropiano.org/news/aggiornamenti-in-breve/feed'), + (u'Economia', + u'http://contropiano.org/news/news-economia/feed'), + (u'Ambiente', + u'http://contropiano.org/news/ambiente-news/feed'), + (u'Scienza', + u'http://contropiano.org/news/scienza-news/feed'), + (u'Cultura', + u'http://contropiano.org/news/cultura-news/feed'), + (u'Locali', u'http://contropiano.org/regionali/feed'), + (u'Lavoro', u'http://contropiano.org/news/lavoro-conflitto-news/feed'), + (u'Malapolizia', u'http://contropiano.org/news/malapolizia-news/feed'), + (u'Interventi', u'http://contropiano.org/interventi/feed'), + (u'Documenti', u'http://contropiano.org/documenti/feed'), + (u'Vignette', u'http://contropiano.org/vignette/feed'), + (u'Altro', + u'http://contropiano.org/altro/feed') + ]