calibre/recipes/rynek_infrastruktury.recipe
Kovid Goyal 29cd8d64ea
Change shebangs to python from python2
Also remove a few other miscellaneous references to python2
2020-08-22 18:47:51 +05:30

39 lines
1.4 KiB
Python

#!/usr/bin/env python
__license__ = 'GPL v3'
__author__ = 'teepel <teepel44@gmail.com>'
'''
http://www.rynekinfrastruktury.pl
'''
from calibre.web.feeds.news import BasicNewsRecipe
class prawica_recipe(BasicNewsRecipe):
title = u'Rynek Infrastruktury'
__author__ = 'teepel <teepel44@gmail.com>'
language = 'pl'
description = u'Portal "Rynek Infrastruktury" to źródło informacji o kluczowych elementach polskiej gospodarki: drogach, kolei, lotniskach, portach, telekomunikacji, energetyce, prawie i polityce, wzmocnione eksperckimi komentarzami kluczowych analityków.' # noqa
remove_empty_feeds = True
oldest_article = 1
max_articles_per_feed = 50
remove_javascript = True
no_stylesheets = True
feeds = [
(u'Drogi', u'http://www.rynekinfrastruktury.pl/rss/drogi.xml'),
(u'Kolej', u'http://www.rynekinfrastruktury.pl/rss/kolej.xml'),
(u'Energetyka', u'http://www.rynekinfrastruktury.pl/rss/energetyka.xml')
# no news in these feeds since 4 years:
# (u'Porty i lotniska', u'http://www.rynekinfrastruktury.pl/rss/porty-i-lotniska.xml'),
# (u'Komentarze', u'http://www.rynekinfrastruktury.pl/rss/komentarze-i-felietony.xml'),
]
keep_only_tags = [
dict(name='h1', attrs={'class': 'wiadTit'}),
dict(name='div', attrs={'class': ['wiadSzczegol', 'multimediaWiadomosci', 'wiadTresc']})
]
remove_tags = [dict(name='span', attrs={'class': 'kom'})]