#!/usr/bin/env python2 # -*- coding: utf-8 -*- __license__ = 'GPL v3' __copyright__ = u'2011, Silviu Cotoar\u0103' ''' prosport.ro ''' from calibre.web.feeds.news import BasicNewsRecipe class Prosport(BasicNewsRecipe): title = 'Prosport' __author__ = u'Silviu Cotoar\u0103' publisher = 'Prosport' description = u'\u0218tiri Sportive din Rom\u00e2nia' oldest_article = 5 language = 'ro' max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False category = 'Ziare,Stiri,Romania,Sport' encoding = 'utf-8' cover_url = 'http://storage0.dms.mpinteractiv.ro/media/401/581/7946/3688311/1/logo-pro.jpg?width=610' conversion_options = { 'comments' : description ,'tags' : category ,'language' : language ,'publisher' : publisher } keep_only_tags = [ dict(name='h1', attrs={'class':'a-title'}) ,dict(name='div', attrs={'class':'a-entry'}) ] remove_tags = [ dict(name='div', attrs={'class':'utils'}) ,dict(name='div', attrs={'class':'g-slide'}) ] feeds = [ (u'\u0218tiri', u'http://www.prosport.ro/rss.xml')] def preprocess_html(self, soup): return self.adeify_images(soup)