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

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2010, Dean Cording'
  3. '''
  4. abc.net.au/news
  5. '''
  6. import re
  7. from calibre.web.feeds.recipes import BasicNewsRecipe
  8.  
  9. class BusinessSpectator(BasicNewsRecipe):
  10.     title                  = 'Business Spectator'
  11.     __author__             = 'Dean Cording'
  12.     description            = 'Australian Business News & commentary delivered the way you want it.'
  13.     masthead_url           = 'http://www.businessspectator.com.au/bs.nsf/logo-business-spectator.gif'
  14.     cover_url              = masthead_url
  15.  
  16.     oldest_article         = 2
  17.     max_articles_per_feed  = 100
  18.     no_stylesheets         = True
  19.     #delay                  = 1
  20.     use_embedded_content   = False
  21.     encoding               = 'utf8'
  22.     publisher              = 'Business Spectator'
  23.     category               = 'News, Australia, Business'
  24.     language               = 'en_AU'
  25.     publication_type       = 'newsportal'
  26.     preprocess_regexps     = [(re.compile(r'<!--.*?-->', re.DOTALL), lambda m: '')]
  27.     conversion_options = {
  28.                              'comments'        : description
  29.                             ,'tags'            : category
  30.                             ,'language'        : language
  31.                             ,'publisher'       : publisher
  32.                             ,'linearize_tables': False
  33.                          }
  34.  
  35.     keep_only_tags    =  [dict(id='storyHeader'), dict(id='body-html')]
  36.  
  37.     remove_tags = [dict(attrs={'class':'hql'})]
  38.  
  39.     remove_attributes = ['width','height','style']
  40.  
  41.     feeds          = [
  42.                       ('Top Stories', 'http://www.businessspectator.com.au/top-stories.rss'),
  43.                       ('Alan Kohler', 'http://www.businessspectator.com.au/bs.nsf/RSS?readform&type=spectators&cat=Alan%20Kohler'),
  44.                       ('Robert Gottliebsen', 'http://www.businessspectator.com.au/bs.nsf/RSS?readform&type=spectators&cat=Robert%20Gottliebsen'),
  45.                       ('Stephen Bartholomeusz', 'http://www.businessspectator.com.au/bs.nsf/RSS?readform&type=spectators&cat=Stephen%20Bartholomeusz'),
  46.                       ('Daily Dossier', 'http://www.businessspectator.com.au/bs.nsf/RSS?readform&type=kgb&cat=dossier'),
  47.                       ('Australia', 'http://www.businessspectator.com.au/bs.nsf/RSS?readform&type=region&cat=australia'),
  48.                     ]
  49.