# -*- coding: utf-8 -*-

from calibre.web.feeds.news import BasicNewsRecipe


class AdvancedUserRecipe1311790237(BasicNewsRecipe):
    title = 'Periódico El Colombiano'
    __author__ = 'BIGO-CAVA'
    language = 'es_CO'
    cover_url = 'http://www.elcolombiano.com/images/logoElColombiano348x46.gif'
    remove_tags_before = dict(id='contenidoArt')
    remove_tags_after = [
        dict(id='enviaTips'),
        dict(id='zonaPata'),
    ]
    oldest_article = 1
    max_articles_per_feed = 100
    remove_javascript = True
    no_stylesheets = True
    use_embedded_content = False
    remove_empty_feeds = True
    masthead_url = 'http://www.elcolombiano.com/images/logoElColombiano348x46.gif'
    publication_type = 'newspaper'

    extra_css = '''
                               p{text-align: justify; font-size: 100%}
                               body{ text-align: left; font-size:100% }
                               h1{font-family: sans-serif; font-size:150%; font-weight:bold; text-align: justify; }
                               h3{font-family: sans-serif; font-size:100%; font-style: italic; text-align: justify; }
                                 '''

    feeds = [
        ('Portada', 'http://www.elcolombiano.com/rss/portada.xml'),
        ('Antioquia', 'http://www.elcolombiano.com/rss/Antioquia.xml'),
        ('Colombia', 'http://www.elcolombiano.com/rss/Colombia.xml'),
        ('Economia', 'http://www.elcolombiano.com/rss/Economia.xml'),
        ('Internacional', 'http://www.elcolombiano.com/rss/Internacional.xml'),
        ('Politica', 'http://www.elcolombiano.com/rss/Politica.xml'),
        ('Cultura', 'http://www.elcolombiano.com/rss/Cultura.xml'),
        ('Entretenimiento', 'http://www.elcolombiano.com/rss/Farandula.xml'),
        ('Tecnologia', 'http://www.elcolombiano.com/rss/Tecnologia.xml'),
        ('Television', 'http://www.elcolombiano.com/rss/Television.xml'),
        ('Vida y Sociedad', 'http://www.elcolombiano.com/rss/Vida.xml'),
        ('Turismo', 'http://www.elcolombiano.com/rss/Turismo.xm'),
        ('Salud', 'http://www.elcolombiano.com/rss/Salud.xml'),
        ('Ciencia', 'http://www.elcolombiano.com/rss/Ciencia.xml'),
    ]

    remove_tags = [
        dict(name='div', attrs={'class': 'objetosRelacionados'}),
        dict(name='div', attrs={'class': 'notasRelacionadas contenedor'}),
        dict(name='div', attrs={'class': 'comentarios'}),
        dict(name='div', attrs={'class': 'mapaDelSitio'}),
        dict(name='div', attrs={'class': 'creditos'}),
        dict(name='div', attrs={'class': 'votos'}),
        dict(name='div', attrs={'class': 'divopt2'}),
        dict(name='div', attrs={'class': 'comentarios'}),
        dict(name='div', attrs={'class': 'pestanasLateral'}),
        dict(name='div', attrs={'class': 'resumenSeccion'}),
        dict(name='div', attrs={'class': 'zonaComercial'}),
        dict(name='div', attrs={'id': 'zonaPata'}),
    ]
