#!/usr/bin/env python # -*- coding: utf-8 -*- __license__ = 'GPL v3' __copyright__ = u'2011, Silviu Cotoar\u0103' ''' money.ro ''' from calibre.web.feeds.news import BasicNewsRecipe class MoneyRo(BasicNewsRecipe): title = 'Money Ro' __author__ = u'Silviu Cotoar\u0103' description = u'\u0218tiri din Rom\u00e2nia' publisher = 'MoneyRo' oldest_article = 5 language = 'ro' max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False category = 'Ziare,Stiri,Romania' encoding = 'utf-8' remove_javascript = True cover_url = 'http://assets.moneyweb.ro/images/logo_money.jpg' conversion_options = { 'comments': description, 'tags': category, 'language': language, 'publisher': publisher } keep_only_tags = [dict(name='div', attrs={'id': 'titluArticol'}), dict(name='img', attrs={'id': 'objImage'}), dict(name='div', attrs={'class': 'leftColumnArticle'}) # noqa ] remove_tags_after = [dict(name='div', attrs={'id': 'articleTags'})] remove_tags = [dict(name='div', attrs={'id': 'ads'}), dict(name='div', attrs={'id': 'aus'}), dict(name='div', attrs={'id': 'bb-comment-create-form'}), dict(name='div', attrs={'id': 'articleTags'}), dict(name='div', attrs={'class': 'breadcrumb'}) # noqa ] feeds = [ (u'\u0218tiri', u'http://moneyro.feedsportal.com/c/32533/fe.ed/rss.money.ro/stiri.xml')] def preprocess_html(self, soup): return self.adeify_images(soup)