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

  1.  
  2.  
  3. __license__   = 'GPL v3'
  4. __copyright__ = '2010, Larry Chan <larry1chan at gmail.com>'
  5. '''
  6. Singtao STNN
  7. '''
  8. from calibre.web.feeds.recipes import BasicNewsRecipe
  9.  
  10. class SingtaoSTNN(BasicNewsRecipe):
  11.     title                  = 'Singtao STNN'
  12.     __author__             = 'Larry Chan, larry1chan'
  13.     description            = 'Chinese News'
  14.     oldest_article         = 2
  15.     max_articles_per_feed  = 100
  16.     simultaneous_downloads = 5
  17.     no_stylesheets         = True
  18.     #delay                  = 1
  19.     use_embedded_content   = False
  20.     encoding               = 'gb2312'
  21.     publisher              = 'Singtao STNN'
  22.     category               = 'news, China, world'
  23.     language               = 'zh'
  24.     publication_type       = 'newsportal'
  25.     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} '
  26.     masthead_url          = 'http://www.stnn.cc/images/0806/logo_080728.gif'
  27.     conversion_options = {
  28.                              'comments'        : description
  29.                             ,'tags'            : category
  30.                             ,'language'        : language
  31.                             ,'publisher'       : publisher
  32.                             ,'linearize_tables': True
  33.                          }
  34.  
  35.  
  36.     remove_tags_before = dict(name='div', attrs={'class':['page_box']})
  37.     remove_tags_after  = dict(name='div', attrs={'class':['pagelist']})
  38.  
  39.     keep_only_tags    = [
  40.             dict(name='div', attrs={'class':['font_title clearfix']}),
  41.                         dict(name='div', attrs={'id':['content_zoom']})
  42.  
  43.             ]
  44.  
  45.     remove_attributes = ['width','height','href']
  46.  
  47.     # for a full list of rss check out [url]http://www.stnn.cc/rss/[/url]
  48.  
  49.     feeds          = [  (u'Headline News', u'http://www.stnn.cc/rss/news/index.xml'),
  50.             (u'Breaking News', u'http://www.stnn.cc/rss/tufa/index.xml'),
  51.             (u'Finance', u'http://www.stnn.cc/rss/fin/index.xml'),
  52.             (u'Entertainment', u'http://www.stnn.cc/rss/ent/index.xml'),
  53.             (u'International', u'http://www.stnn.cc/rss/guoji/index.xml'),
  54.             (u'China', u'http://www.stnn.cc/rss/china/index.xml'),
  55.             (u'Opnion', u'http://www.stnn.cc/rss/fin_op/index.xml'),
  56.             (u'Blog', u'http://blog.stnn.cc/uploadfile/rssblogtypehotlog.xml'),
  57.             (u'Hong Kong', u'http://www.stnn.cc/rss/hongkong/index.xml')
  58.  
  59.             ]
  60.  
  61.