home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Narzedzia / Calibre / calibre-0.8.18.msi / file_280 / auto.recipe < prev    next >
Encoding:
Text File  |  2011-09-09  |  2.1 KB  |  64 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__     = 'v1.02 Marini Gabriele '
  6. __date__        = '14062010'
  7. __description__ = 'Italian daily newspaper'
  8.  
  9. '''
  10. http://www.corrieredellosport.it/
  11. '''
  12. from calibre.web.feeds.news import BasicNewsRecipe
  13.  
  14. class Auto(BasicNewsRecipe):
  15.     __author__     = 'Gabriele Marini'
  16.     description    = 'Auto and Formula 1'
  17.  
  18.     cover_url      = 'http://www.auto.it/res/imgs/logo_Auto.png'
  19.  
  20.  
  21.     title          = u'Auto'
  22.     publisher      = 'CONTE Editore'
  23.     category       = 'Sport'
  24.  
  25.     language       = 'it'
  26.     timefmt        = '[%a, %d %b, %Y]'
  27.  
  28.     oldest_article = 60
  29.     max_articles_per_feed = 30
  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='h2', attrs={'class':['tit_Article y_Txt']}),
  47.                       dict(name='h2', attrs={'class':['tit_Article']}),
  48.                       dict(name='div', attrs={'class':['box_Img newsdet_new ']}),
  49.                       dict(name='div', attrs={'class':['box_Img newsdet_as ']}),
  50.                       dict(name='table', attrs={'class':['table_A']}),
  51.                       dict(name='div', attrs={'class':['txt_Article txtBox_cms']}),
  52.                       dict(name='testoscheda')]
  53.  
  54.  
  55.     feeds = [
  56.              (u'Tutte le News'   ,  u'http://www.auto.it/rss/articoli.xml'  ),
  57.              (u'Prove su Strada' ,  u'http://www.auto.it/rss/prove+6.xml'),
  58.              (u'Novit\xe0'       ,    u'http://www.auto.it/rss/novita+3.xml')
  59.             ]
  60.  
  61.  
  62.  
  63.  
  64.