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