1
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
3
from calibre.web.feeds.news import BasicNewsRecipe
4
class Computerworld_pl(BasicNewsRecipe):
5
title = u'Computerworld.pl'
7
description = u'Serwis o IT w przemyśle, finansach, handlu, administracji oraz rynku IT i telekomunikacyjnym - wiadomości, opinie, analizy, porady prawne'
12
max_articles_per_feed = 100
13
keep_only_tags=[dict(name='div', attrs={'id':'s'})]
14
remove_tags_after=dict(name='div', attrs={'class':'rMobi'})
15
remove_tags=[dict(name='div', attrs={'class':['nnav', 'rMobi']}), dict(name='table', attrs={'class':'ramka_slx'})]
16
feeds = [(u'Wiadomo\u015bci', u'http://rssout.idg.pl/cw/news_iso.xml')]
18
def get_cover_url(self):
19
soup = self.index_to_soup('http://www.computerworld.pl/')
20
cover=soup.find(name='img', attrs={'class':'prawo'})
21
self.cover_url=cover['src']
22
return getattr(self, 'cover_url', self.cover_url)