#!/usr/bin/env  python
__license__   = 'GPL v3'
__copyright__ = '2010, Brendan Sleight <bms.calibre at barwap.com>'
'''
hola.com
'''

from calibre.web.feeds.news import BasicNewsRecipe

class Hackaday(BasicNewsRecipe):
    title                 = u'Hola'
    __author__            = 'bmsleight'
    description           = 'diario de actualidad, moda y belleza.'
    oldest_article        = 10
    max_articles_per_feed = 100
    no_stylesheets        = True
    language              = 'es'

    use_embedded_content  = False

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

    feeds               = [
                         (u'Famosos'        , u'http://www.hola.com/famosos/rss.xml'           ),
                         (u'Realeza'        , u'http://www.hola.com/realeza/rss.xml'           ),
                         (u'Cine'           , u'http://www.hola.com/cine/rss.xml'              ),
                         (u'Música'         , u'http://www.hola.com/musica/rss.xml'            ),
                         (u'Moda y modelos' , u'http://www.hola.com/moda/portada/rss.xml'      ),
                         (u'Belleza y salud', u'http://www.hola.com/belleza/portada/rss.xml'   ),
                         (u'Niños'          , u'http://www.hola.com/ninos/rss.xml'             ),
                         (u'Todas las noticias', u'http://int2.hola.com/app/feeds/rss_hola.php'),
                         ]

    def get_article_url(self, article):
        url = article.get('guid', None)
        return url
