home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Narzedzia / Calibre / calibre-0.8.18.msi / file_280 / moneynews.recipe < prev    next >
Encoding:
Text File  |  2011-09-09  |  1.9 KB  |  52 lines

  1. #!/usr/bin/env  python
  2.  
  3. __license__   = 'GPL v3'
  4. __copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
  5. '''
  6. moneynews.newsmax.com
  7. '''
  8.  
  9. from calibre.web.feeds.news import BasicNewsRecipe
  10.  
  11. class MoneyNews(BasicNewsRecipe):
  12.     title                 = 'Moneynews.com'
  13.     __author__            = 'Darko Miletic'
  14.     description           = 'Financial news worldwide'
  15.     publisher             = 'moneynews.com'
  16.     language = 'en'
  17.  
  18.     category              = 'news, finances, USA, business'
  19.     oldest_article        = 2
  20.     max_articles_per_feed = 100
  21.     no_stylesheets        = True
  22.     use_embedded_content  = False
  23.     encoding              = 'cp1252'
  24.  
  25.     html2lrf_options = [
  26.                           '--comment', description
  27.                         , '--category', category
  28.                         , '--publisher', publisher
  29.                         , '--ignore-tables'
  30.                         ]
  31.  
  32.     html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"\nlinearize_tables=True'
  33.  
  34.     feeds = [
  35.               (u'Street Talk'          , u'http://moneynews.newsmax.com/xml/streettalk.xml'  )
  36.              ,(u'Finance News'         , u'http://moneynews.newsmax.com/xml/FinanceNews.xml' )
  37.              ,(u'Economy'              , u'http://moneynews.newsmax.com/xml/economy.xml'     )
  38.              ,(u'Companies'            , u'http://moneynews.newsmax.com/xml/companies.xml'   )
  39.              ,(u'Markets'              , u'http://moneynews.newsmax.com/xml/Markets.xml'     )
  40.              ,(u'Investing & Analysis' , u'http://moneynews.newsmax.com/xml/investing.xml'   )
  41.             ]
  42.  
  43.  
  44.     keep_only_tags = [dict(name='table', attrs={'class':'copy'})]
  45.  
  46.     remove_tags = [
  47.                      dict(name='td'   , attrs={'id':'article_fontsize'})
  48.                     ,dict(name='table', attrs={'id':'toolbox'         })
  49.                     ,dict(name='tr'   , attrs={'id':'noprint3'        })
  50.                   ]
  51.  
  52.