home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_3672 < prev    next >
Encoding:
Text File  |  2010-06-14  |  2.1 KB  |  61 lines

  1. #!/usr/bin/env  python
  2. __license__     = 'GPL v3'
  3. __author__      = 'GabrieleMarini, based on Darko Miletic'
  4. __copyright__   = '2009, Darko Miletic <darko.miletic at gmail.com>, Gabriele Marini'
  5. __version__     = '  '
  6. __date__        = '14-06-2010'
  7. __description__ = 'Italian daily newspaper'
  8.  
  9. '''
  10. http://www.corrieredellosport.it/
  11. '''
  12. from calibre.web.feeds.news import BasicNewsRecipe
  13.  
  14. class ilCorrieredelloSport(BasicNewsRecipe):
  15.     __author__     =  'Gabriele Marini'
  16.     description    = 'Italian daily newspaper'
  17.  
  18.     cover_url      = 'http://edicola.corrieredellosport.it/newsmem/corsport/prima/nazionale_prima.jpg'
  19.  
  20.  
  21.     title          = u'Il Corriere dello Sport'
  22.     publisher      = 'CORRIERE DELLO SPORT s.r.l. '
  23.     category       = 'Sport'
  24.  
  25.     language       = 'it'
  26.     timefmt        = '[%a, %d %b, %Y]'
  27.  
  28.     oldest_article = 10
  29.     max_articles_per_feed = 100
  30.     use_embedded_content  = False
  31.     recursion             = 10
  32.  
  33.     remove_javascript = True
  34.     no_stylesheets = True
  35.  
  36.     html2lrf_options = [
  37.                           '--comment', description
  38.                         , '--category', category
  39.                         , '--publisher', publisher
  40.                         , '--ignore-tables'
  41.                         ]
  42.  
  43.     html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"\nlinearize_tables=True'
  44.  
  45.     keep_only_tags = [
  46.                       dict(name='h1', attrs={'class':['tit_Article']}),
  47.                       dict(name='h1', attrs={'class':['tit_Article_mondiali']}),
  48.                       dict(name='div', attrs={'class':['box_Img']}),
  49.                       dict(name='p', attrs={'class':['summary','text']})]
  50.  
  51.  
  52.  
  53.  
  54.     feeds = [
  55.              (u'Primo Piano'   ,  u'http://www.corrieredellosport.it/rss/primo_piano.xml'  ),
  56.              (u'Calcio'        ,  u'http://www.corrieredellosport.it/rss/Calcio-3.xml'),
  57.              (u'Formula 1'   ,    u'http://www.corrieredellosport.it/rss/Formula-1-7.xml'),
  58.              (u'Moto'   ,         u'http://www.corrieredellosport.it/rss/Moto-8.xml'),
  59.              (u'Piu visti'   ,    u'http://www.corrieredellosport.it/rss/piu_visti.xml')
  60.             ]
  61.