#!/usr/bin/env  python
__license__   = 'GPL v3'
__author__    = 'Lorenzo Vigentini'
__copyright__ = '2009, Lorenzo Vigentini <l.vigentini at gmail.com>'
__version__     = 'v1.01'
__date__        = '10, January 2010'
__description__ = 'Italian News Agency'

'''
http://www.quotidianonet.ilsole24ore.com/
'''

from calibre.web.feeds.news import BasicNewsRecipe

class panorama(BasicNewsRecipe):
    __author__     = 'Lorenzo Vigentini, based on Darko Miletic'
    description    = 'Italian News Agency'

    cover_url      = 'http://quotidianonet.ilsole24ore.com/file_generali/img/logo_quotidianonet-top.gif'
    title          = u'Quotidiano Net '
    publisher      = 'italiaNews'
    category       = 'News, politics, culture, economy, general interest'

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

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

    remove_javascript = True

    keep_only_tags     = [dict(name='div', attrs={'class':'box_contenuto articolo'})]

    remove_tags        = [
                            dict(name=['object','link']),
                            dict(name='div',attrs={'class':['post-meta','sharing-tools','related','comments','prev-next','box_contenuto adsense']}),
                            dict(name='div',attrs={'id':['strumenti','related-posts','footer','inline_boxes','inline_boxes_header','inline_boxes_body','bottom']}),
                            dict(name='span',attrs={'class':'titolosezione default'})
                         ]

    feeds          = [
                       (u'Prima pagina', u'http://quotidianonet.ilsole24ore.com/rss/home.xml'),
                       (u'Cronaca', u'http://quotidianonet.ilsole24ore.com/rss/cronaca.xml'),
                       (u'Economia', u'http://quotidianonet.ilsole24ore.com/rss/economia.xml'),
                       (u'Esteri', u'http://quotidianonet.ilsole24ore.com/rss/esteri.xml'),
                       (u'Politica', u'http://quotidianonet.ilsole24ore.com/rss/politica.xml'),
                       (u'Salute', u'http://quotidianonet.ilsole24ore.com/rss/salute.xml'),
                       (u'Tecnologia', u'http://quotidianonet.ilsole24ore.com/rss/tecnologia.xml'),

                     ]
