# -*- coding: utf-8 -*- #!/usr/bin/env python __license__ = 'GPL v3' __copyright__ = u'2011, Silviu Cotoar\u0103' ''' gsp.ro ''' from calibre.web.feeds.news import BasicNewsRecipe class GSP(BasicNewsRecipe): title = u'Gazeta Sporturilor' language = 'ro' __author__ = u'Silviu Cotoar\u0103' description = u'Gazeta Sporturilor' publisher = u'Gazeta Sporturilor' category = 'Ziare,Sport,Stiri,Romania' oldest_article = 5 max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False encoding = 'utf-8' remove_javascript = True cover_url = 'http://www.gsp.ro/images/logo.jpg' conversion_options = { 'comments' : description ,'tags' : category ,'language' : language ,'publisher' : publisher } keep_only_tags = [ dict(name='h1', attrs={'class':'serif title_2'}) ,dict(name='div', attrs={'id':'only_text'}) ,dict(name='span', attrs={'class':'block poza_principala'}) ] feeds = [ (u'\u0218tiri', u'http://www.gsp.ro/rss.xml') ] def preprocess_html(self, soup): return self.adeify_images(soup)