From 0376871759e635ff8a634caab8c9b7d1db98acff Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 10 Dec 2011 15:26:48 +0530 Subject: [PATCH] descopera.org by Marius Ignatescu --- recipes/descopera_org.recipe | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 recipes/descopera_org.recipe diff --git a/recipes/descopera_org.recipe b/recipes/descopera_org.recipe new file mode 100644 index 0000000000..c76e88a588 --- /dev/null +++ b/recipes/descopera_org.recipe @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +''' +descopera.org +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class Descopera(BasicNewsRecipe): + title = u'Descoperă.org' + __author__ = 'Marius Ignătescu' + description = 'Descoperă. Placerea de a cunoaște' + publisher = 'descopera.org' + category = 'science, technology, culture, history, earth' + language = 'ro' + oldest_article = 14 + max_articles_per_feed = 100 + encoding = 'utf8' + no_stylesheets = True + extra_css = ' body{ font-family: Verdana,Helvetica,Arial,sans-serif } .introduction{font-weight: bold} .story-feature{display: block; padding: 0; border: 1px solid; width: 40%; font-size: small} .story-feature h2{text-align: center; text-transform: uppercase} ' + keep_only_tags = [dict(name='div', attrs={'class':['post']})] + remove_tags = [dict(name='div', attrs={'class':['topnav', 'box_a', 'shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge']})] + remove_attributes = ['width','height'] + cover_url = 'http://www.descopera.org/wp-content/themes/dorg/styles/default/img/b_top.png?width=400' + feeds = [(u'Articles', u'http://www.descopera.org/feed/')] + + def preprocess_html(self, soup): + return self.adeify_images(soup)