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

  1.  
  2. __license__   = 'GPL v3'
  3. __copyright__ = '2010, Larry Chan <larry1chan at gmail.com>'
  4. '''
  5. oriental daily
  6. '''
  7. from calibre.web.feeds.recipes import BasicNewsRecipe
  8.  
  9. class OrientalDaily(BasicNewsRecipe):
  10.     title                  = 'Oriental Dailly'
  11.     __author__             = 'Larry Chan'
  12.     description            = 'News from HK'
  13.     oldest_article         = 2
  14.     max_articles_per_feed  = 100
  15.     simultaneous_downloads = 5
  16.     no_stylesheets         = True
  17.     #delay                  = 1
  18.     use_embedded_content   = False
  19.     encoding               = 'utf8'
  20.     publisher              = 'Oriental Daily'
  21.     category               = 'news, HK, world'
  22.     language               = 'zh'
  23.     publication_type       = 'newsportal'
  24.     extra_css              = ' body{ font-family: Verdana,Helvetica,Arial,sans-serif } .introduction{font-weight: bold} .story-feature{display: block; padding: 0; border: 1px solid; width: 40%; font-size: small} .story-feature h2{text-align: center; text-transform: uppercase} '
  25.  
  26.     conversion_options = {
  27.                              'comments'        : description
  28.                             ,'tags'            : category
  29.                             ,'language'        : language
  30.                             ,'publisher'       : publisher
  31.                             ,'linearize_tables': True
  32.                          }
  33.  
  34.     remove_tags_after  = dict(id='bottomNavCTN')
  35.  
  36.     keep_only_tags    = [
  37.                        dict(name='div', attrs={'id':['leadin', 'contentCTN-right']})
  38.  
  39.                         ]
  40.  
  41.     remove_tags = [
  42.                        dict(name='div', attrs={'class':['largeAdsCTN', 'contentCTN-left', 'textAdsCTN', 'footerAds clear']}),
  43.                        dict(name='div', attrs={'id':['articleNav']})
  44.  
  45.                         ]
  46.  
  47.     remove_attributes = ['width','height','href']
  48.  
  49.  
  50.     feeds          = [(u'Oriental Daily', u'http://orientaldaily.on.cc/rss/news.xml')]
  51.