#!/usr/pkg/bin/python3.13
__license__ = 'GPL v3'
__copyright__ = '11 December 2010, desUBIKado'
__author__ = 'desUBIKado'
__description__ = 'Entertainment guide from Aragon'
__version__ = 'v0.01'
__date__ = '11, December 2010'
'''
[url]http://www.redaragon.es/[/url]
'''

from calibre.web.feeds.news import BasicNewsRecipe


class heraldo(BasicNewsRecipe):
    __author__ = 'desUBIKado'
    description = u'Guia de ocio desde Aragon'
    title = u'RedAragon'
    publisher = 'Grupo Z'
    category = 'Concerts, Movies, Entertainment news'
    cover_url = 'http://www.redaragon.com/2008_img/logotipo.gif'
    language = 'es'
    timefmt = '[%a, %d %b, %Y]'
    oldest_article = 15
    max_articles_per_feed = 100
    encoding = 'iso-8859-1'
    use_embedded_content = False
    remove_javascript = True
    no_stylesheets = True

    feeds = [(u'Conciertos', u'http://redaragon.com/rss/agenda.asp?tid=1'),
             (u'Exposiciones', u'http://redaragon.com/rss/agenda.asp?tid=5'),
             (u'Teatro', u'http://redaragon.com/rss/agenda.asp?tid=10'),
             (u'Conferencias', u'http://redaragon.com/rss/agenda.asp?tid=2'),
             (u'Ferias', u'http://redaragon.com/rss/agenda.asp?tid=6'),
             (u'Filmotecas/Cineclubs',
              u'http://redaragon.com/rss/agenda.asp?tid=7'),
             (u'Presentaciones',
              u'http://redaragon.com/rss/agenda.asp?tid=9'),
             (u'Fiestas', u'http://redaragon.com/rss/agenda.asp?tid=11'),
             (u'Infantil', u'http://redaragon.com/rss/agenda.asp?tid=13'),
             (u'Otros', u'http://redaragon.com/rss/agenda.asp?tid=8')]

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

    remove_tags = [dict(name='div', attrs={
                        'class': ['Comparte', 'CajaAgenda', 'Caja', 'Cintillo']})]

    remove_tags_before = dict(name='div', attrs={'id': 'FichaEventoAgenda'})

    remove_tags_after = dict(name='div', attrs={'class': 'Cintillo'})
