View Single Post
Old 04-01-2010, 11:18 AM   #1711
gambarini
Connoisseur
gambarini began at the beginning.
 
Posts: 98
Karma: 22
Join Date: Mar 2010
Device: IRiver Story, Ipod Touch, Android SmartPhone
Quote:
Originally Posted by kiklop74 View Post
There is a problem with this feed. You should post a bug report in calibre trac.
I have opened a ticket; they don't debug singles feeds, but they give me an excellent suggestion:
they say " probably your remove_tags is too aggressive or the html has some problems..."
Now with the correct remove_tags every article shows perfect!!!!!
And so, now the recipe is complete.
Thanks to all!!!

Code:
#!/usr/bin/env  python
__license__   = 'GPL v3'
__author__    = '^^^^^^'
__copyright__ = '******'
__description__ = 'Punto Informatico'

'''
http://www.punto-informatico.it/
'''

from calibre.web.feeds.news import BasicNewsRecipe


class ilsole(BasicNewsRecipe):
    author        = '***'
    description   = 'Punto Informatico: Internet dal 1996'

    cover_url      = ' '
    title          = u'Punto Informatico '
    publisher      = 'italiaNews High Tech'
    category       = 'News, finance, economy, politics'

    language       = 'it'
    timefmt        = '[%a, %d %b, %Y]'

    oldest_article = 15
    max_articles_per_feed = 50
    use_embedded_content  = False

    remove_javascript  = True
    no_stylesheets     = True
    keep_only_tags     = [dict(name='div', attrs={'class':'box'})]
	remove_tags        = [dict(name='div',attrs={'class':'boxadv'})]
    def get_article_url(self, article):
        return article.get('id', article.get('guid', None))

    feeds              = [(u'Punto Informatico',u'http://feeds.punto-informatico.it/c/32288/f/438866/index.rss')]
gambarini is offline