Today’s Calibre Recipe is: ‘ il Corriere della sera’

il Corriere is the most popular daily newspaper in italy with an average of over 620000 copies sold every day and a long history (first copy published in 1876). The main office is in Milan and It is published by the RCS group.

Click here to view the code

#!/usr/bin/env  python
__license__     = 'GPL v3'
__author__      = 'Lorenzo Vigentini, based on Darko Miletic'
__copyright__   = '2009, Darko Miletic , Lorenzo Vigentini '
__version__     = 'v1.01'
__date__        = '10, January 2010'
__description__ = 'Italian daily newspaper'

'''
http://www.corriere.it/
'''

from calibre.web.feeds.news import BasicNewsRecipe

class ilCorriere(BasicNewsRecipe):
    author        = 'Lorenzo Vigentini, based on Darko Miletic'
    description   = 'Italian daily newspaper'

    cover_url      = 'http://images.corriereobjects.it/images/static/common/logo_home.gif?v=200709121520'
    title          = u'Il Corriere della sera '
    publisher      = 'RCS Digital'
    category       = 'News, politics, culture, economy, general interest'         

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

    oldest_article = 1
    max_articles_per_feed = 100
    use_embedded_content  = False
    recursion             = 10    

    remove_javascript = True
    no_stylesheets = True

    html2lrf_options = [
                          '--comment', description
                        , '--category', category
                        , '--publisher', publisher
                        , '--ignore-tables'
                        ]

    html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"\nlinearize_tables=True' 

    keep_only_tags = [dict(name='div', attrs={'class':['news-dettaglio article','article']})]

    remove_tags = [
                   dict(name=['base','object','link','embed']),
                   dict(name='div', attrs={'class':'news-goback'}),
                   dict(name='ul', attrs={'class':'toolbar'})
                  ]

    remove_tags_after = dict(name='p', attrs={'class':'footnotes'})

    feeds = [
             (u'Ultimora'  , u'http://www.corriere.it/rss/ultimora.xml'  ),
             (u'Editoriali', u'http://www.corriere.it/rss/editoriali.xml'),
             (u'Cronache'  , u'http://www.corriere.it/rss/cronache.xml'  ),
             (u'Politica'  , u'http://www.corriere.it/rss/politica.xml'  ),
             (u'Esteri'    , u'http://www.corriere.it/rss/esteri.xml'    ),
             (u'Economia'  , u'http://www.corriere.it/rss/economia.xml'  ),
             (u'Cultura'    , u'http://www.corriere.it/rss/cultura.xml'  ),
             (u'Scienze'   , u'http://www.corriere.it/rss/scienze.xml'   ),
             (u'Salute'    , u'http://www.corriere.it/rss/salute.xml'    ),
             (u'Spettacolo', u'http://www.corriere.it/rss/spettacoli.xml'),
             (u'Cinema e TV', u'http://www.corriere.it/rss/cinema.xml'   ),
             (u'Sport'     , u'http://www.corriere.it/rss/sport.xml'     )
            ]

or Download the file here: Calibre recipe – ilCorriere



Be Sociable, Share!
Calibre Recipe: il Corriere della sera
Tagged on: