View Single Post
Old 11-08-2010, 05:25 PM   #1
bmsleight
Member
bmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enough
 
Posts: 24
Karma: 540
Join Date: Aug 2010
Device: Kindle 3
Hola.com Recipe - Solved

Hi All,

Sharing a Hola.com recipe I made for someone else...

Spoiler:
Code:
#!/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


Enjoy,
Brendan
bmsleight is offline   Reply With Quote