mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
26 lines
1.3 KiB
Plaintext
26 lines
1.3 KiB
Plaintext
from calibre.web.feeds.news import BasicNewsRecipe
|
|
import re
|
|
|
|
class AdvancedUserRecipe1312886443(BasicNewsRecipe):
|
|
title = u'WNP'
|
|
cover_url= 'http://k.wnp.pl/images/wnpLogo.gif'
|
|
__author__ = 'fenuks'
|
|
description = u'Wirtualny Nowy Przemysł'
|
|
category = 'economy'
|
|
language = 'pl'
|
|
preprocess_regexps = [(re.compile(ur'Czytaj też:.*?</a>', re.DOTALL), lambda match: ''), (re.compile(ur'Czytaj więcej:.*?</a>', re.DOTALL), lambda match: '')]
|
|
oldest_article = 8
|
|
max_articles_per_feed = 100
|
|
no_stylesheets= True
|
|
remove_tags=[dict(attrs={'class':'printF'})]
|
|
feeds = [(u'Wiadomości gospodarcze', u'http://www.wnp.pl/rss/serwis_rss.xml'),
|
|
(u'Serwis Energetyka - Gaz', u'http://www.wnp.pl/rss/serwis_rss_1.xml'),
|
|
(u'Serwis Nafta - Chemia', u'http://www.wnp.pl/rss/serwis_rss_2.xml'),
|
|
(u'Serwis Hutnictwo', u'http://www.wnp.pl/rss/serwis_rss_3.xml'),
|
|
(u'Serwis Górnictwo', u'http://www.wnp.pl/rss/serwis_rss_4.xml'),
|
|
(u'Serwis Logistyka', u'http://www.wnp.pl/rss/serwis_rss_5.xml'),
|
|
(u'Serwis IT', u'http://www.wnp.pl/rss/serwis_rss_6.xml')]
|
|
|
|
|
|
def print_version(self, url):
|
|
return 'http://wnp.pl/drukuj/' +url[url.find(',')+1:] |