#!/usr/bin/env  python

__license__   = 'GPL v3'
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
'''
www.ieco.clarin.com
'''
from calibre.web.feeds.news import BasicNewsRecipe

class iEco(BasicNewsRecipe):
    title                 = 'iEco Clarin'
    __author__            = 'Darko Miletic'
    description           = 'iEco, el suplemento economico de Clarin. Las ultimas noticias de Empresas y Negocios, Mercados y Finanzas, Economia y Tecnologia de la Argentina y el mundo.'
    oldest_article        = 7
    max_articles_per_feed = 100
    no_stylesheets        = True
    use_embedded_content  = False
    encoding              = 'utf-8'
    publisher             = 'Grupo Clarin'
    category              = 'news, economia, mercados, bolsa de valores, finanzas, empresas, negocios, empleos, emprendedores, marketinguniversidades, tecnologia, agronegocios, noticias, informacion'
    language              = 'es'
    cover_url             = 'http://www.ieco.clarin.com/static2/images/Tapa-PDF.gif'
    extra_css             = ' #bd{font-family: sans-serif} '

    conversion_options = {
                          'comment'   : description
                        , 'tags'      : category
                        , 'publisher' : publisher
                        , 'author'    : publisher
                        , 'language'  : language
                        }

    feeds = [(u'Articulos', u'http://www.ieco.clarin.com/rss/')]

    keep_only_tags = [dict(name='div', attrs={'id':'bd'})]
    remove_tags = [dict(name=['object','link'])]


    def print_version(self, url):
        return url + '?print=1'
