From fc4b09e5acc2fc323c4e51fea40848723881327d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 28 Apr 2011 16:42:29 -0600 Subject: [PATCH] Novinky by Tomas Latal --- recipes/novinky.recipe | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 recipes/novinky.recipe diff --git a/recipes/novinky.recipe b/recipes/novinky.recipe new file mode 100644 index 0000000000..7c5186cb99 --- /dev/null +++ b/recipes/novinky.recipe @@ -0,0 +1,42 @@ +__license__ = 'GPL v3' +__copyright__ = '2011, Tomas Latal' + +from calibre.web.feeds.news import BasicNewsRecipe + +class NovinkyCZ(BasicNewsRecipe): + title = 'Novinky' + __author__ = 'Tomas Latal' + __version__ = '1.0' + __date__ = '24 April 2011' + description = 'News from server Novinky.cz' + oldest_article = 1 + max_articles_per_feed = 10 + encoding = 'utf8' + publisher = 'Novinky' + category = 'news, CZ' + language = 'cs' + publication_type = 'newsportal' + no_stylesheets = True + remove_javascript = True + extra_css = 'p.acmDescription{font-style:italic;} p.acmAuthor{font-size:0.8em; color:#707070}' + + feeds = [ + (u'Dom\xe1c\xed', u'http://www.novinky.cz/rss/domaci/'), + (u'Zahrani\u010d\xed', u'http://www.novinky.cz/rss/zahranicni/'), + (u'Krimi', u'http://www.novinky.cz/rss/krimi/'), + (u'Ekonomika', u'http://www.novinky.cz/rss/ekonomika/'), + (u'Finance', u'http://www.novinky.cz/rss/finance/'), + (u'Kultura', u'http://www.novinky.cz/rss/kultura/'), + (u'Koktejl', u'http://www.novinky.cz/rss/koktejl/'), + (u'Internet a PC', u'http://www.novinky.cz/rss/internet-a-pc/'), + (u'Auto-moto', u'http://www.novinky.cz/rss/auto/'), + ] + + remove_tags_before = dict(id='articleContent') + + remove_tags_after = [dict(id='movedArticleAuthors')] + + remove_tags = [ + dict(name='div', attrs={'id':['articleColumnInfo','pictureInnerBox']}), + dict(name='p', attrs={'id':['articleDate']}) + ]