diff --git a/recipes/icons/zycie_warszawy.png b/recipes/icons/zycie_warszawy.png new file mode 100644 index 0000000000..a13d1a018c Binary files /dev/null and b/recipes/icons/zycie_warszawy.png differ diff --git a/recipes/zycie_warszawy.recipe b/recipes/zycie_warszawy.recipe new file mode 100644 index 0000000000..536529f144 --- /dev/null +++ b/recipes/zycie_warszawy.recipe @@ -0,0 +1,46 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +__license__ = 'GPL v3' +__copyright__ = u'Łukasz Grąbczewski 2012-2013' +__version__ = '1.1' + +''' +zw.com.pl +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class zyciewarszawy(BasicNewsRecipe): + __author__ = u'Łukasz Grączewski' + title = u'Życie Warszawy' + description = u'Wiadomości z Warszawy' + language = 'pl' + publisher = 'Presspublica' + publication_type = 'newspapper' + masthead_url = 'http://www.zw.com.pl/static/img/logo_zw.gif' + no_stylesheets = True + remove_javascript = True + + oldest_article = 1 #daily news only + max_articles_per_feed = 100 + + feeds = [(u'Najnowsze', u'http://www.zw.com.pl/rss/1.html')] + + keep_only_tags = [] + keep_only_tags.append(dict(name = 'div', attrs = {'id' : 'storyp'})) + + remove_tags = [] + remove_tags.append(dict(name = 'div', attrs = {'class' : 'authordate'})) + remove_tags.append(dict(name = 'div', attrs = {'class' : 'author'})) + '''remove_tags.append(dict(name = 'div', attrs = {'class' : 'seealso'}))''' + remove_tags.append(dict(name = 'div', attrs = {'class' : 'more'})) + remove_tags.append(dict(name = 'div', attrs = {'class' : 'clr'})) + remove_tags.append(dict(name = 'div', attrs = {'id' : 'adk_0'})) + remove_tags.append(dict(name = 'div', attrs = {'id' : 'adsense_0'})) + remove_tags.append(dict(name = 'div', attrs = {'id' : 'share_bottom'})) + remove_tags.append(dict(name = 'div', attrs = {'id' : 'copyright_law'})) + + def print_version(self, url): + url += "?print=tak" + return url