recipes provided by luka6000

This commit is contained in:
Tomasz Długosz 2013-03-06 20:30:03 +01:00
parent 338ab5d211
commit 72b925e22a
2 changed files with 46 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

View File

@ -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