#!/usr/bin/env  python

__license__   = 'GPL v3'
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
'''
diariocordoba.com
'''

from calibre.web.feeds.news import BasicNewsRecipe


class Diariosur(BasicNewsRecipe):
    title                 = u'Diario Cordoba'
    __author__            = u'Francisco'
    description           = u'News Cordoba'
    oldest_article        = 5
    max_articles_per_feed = 100
    delay                 = 0
    timeout               = 120
    no_stylesheets        = True
    use_embedded_content  = False
    encoding              = 'UTF-8'
    remove_javascript     = True
    language              = 'es'
    extra_css              = 'body{font-family: Arial,Helvetica,sans-serif}'


    remove_attributes = ['height','width']

    keep_only_tags = [
                       dict(name='div', attrs={'id':'contenidos'})
                     ]

    remove_tags = [
                   dict(name='div', attrs={'class':'Recorte'}),
                  dict(name='div', attrs={'id':'comentarios'}),
                  dict(name='div', attrs={'id':'CajaAccesoCuentaUsuario'}),
                  dict(name='div', attrs={'id':'cajacomparte'}),
                  dict(name='div', attrs={'class':'FormularioDeAcceso'}),
                  dict(name='div', attrs={'class':'TextoFormularioDeAcceso'}),
                  dict(name='div', attrs={'class':'Recorte'}),
                  dict(name='div', attrs={'id':'IframeCajaComparte'}),
                  dict(name='div', attrs={'id':'CintilloComentario'}),
                  dict(name='div', attrs={'id':'EscribeComentario'}),
                  dict(name='div', attrs={'class':'Nota'}),
                  dict(name='div', attrs={'id':'FormularioComentario'}),
                  dict(name='div', attrs={'id':'Comparte'}),
                  dict(name='iframe', attrs={'id':'IframeCajaComparte'}),
                  dict(name='ul', attrs={'class':'herramientasDeNoticia'}),
                  dict(name='div', attrs={'id':'NoticiaEnPapel'}),
                  dict(name='div', attrs={'class':'navegaNoticias'}),
                  dict(name='p', attrs={'class':'RecorteEnNoticias'}),
                  dict(name='ul', attrs={'class':'herramientasDeNoticia'}),
                  dict(name='div', attrs={'class':'navegaNoticias'}),
                  dict(name='div', attrs={'id':'CajaComparte'}),
                  dict(name='div', attrs={'id':'Comparte'})



                  ]




    html2lrf_options = [
                          '--comment', description
                        , '--base-font-size', '6'
                        , '--category', 'news, Spain'
                          , '--ignore-tables'
                        ]




    feeds = [
     (u'Ultima Hora' ,'http://www.diariocordoba.com/rss/ultimahora.xml'),
     (u'Tema del Dia' ,'http://www.diariocordoba.com/rss/106.xml'),
     (u'Local' ,'http://www.diariocordoba.com/rss/101.xml'),
     (u'Provincia' ,'http://www.diariocordoba.com/rss/102.xml'),
     (u'Andalucia' ,'http://www.diariocordoba.com/rss/1.xml'),
     (u'Opinion' ,'http://www.diariocordoba.com/rss/100.xml'),
     (u'Deportes' ,'http://www.diariocordoba.com/rss/4.xml'),
     (u'Espa\xc3\xb1a' ,'http://www.diariocordoba.com/rss/7.xml'),
     (u'Internacional' ,'http://www.diariocordoba.com/rss/6.xml'),
     (u'Economia' ,'http://www.diariocordoba.com/rss/5.xml'),
     (u'Cultura' ,'http://www.diariocordoba.com/rss/3.xml'),
     (u'Sociedad' ,'http://www.diariocordoba.com/rss/103.xml'),
     (u'Gente' ,'http://www.diariocordoba.com/rss/204.xml'),
     (u'Noticias Curiosas' ,'http://www.diariocordoba.com/rss/205.xml'),
     (u'Tecnologia' ,'http://www.diariocordoba.com/rss/206.xml')


                 ]
