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

  1. #!/usr/bin/env  python
  2.  
  3. __license__   = 'GPL v3'
  4. __copyright__ = '2009, Bruce <bruce at dotdoh.com>'
  5. '''
  6. asiaone.com
  7. '''
  8.  
  9. from calibre.web.feeds.news import BasicNewsRecipe
  10.  
  11. class AsiaOne(BasicNewsRecipe):
  12.     title          = u'AsiaOne'
  13.     oldest_article = 3
  14.     max_articles_per_feed = 100
  15.     __author__     = 'Bruce'
  16.     description    = 'News from Singapore Press Holdings Portal'
  17.     no_stylesheets = False
  18.     language = 'en_SG'
  19.  
  20.     remove_tags    = [dict(name='span', attrs={'class':'footer'})]
  21.     keep_only_tags = [dict(name=['span', 'p', 'br', 'b', 'i', 'hr'])]
  22.  
  23.  
  24.  
  25.     feeds          = [
  26.                       ('News', 'http://www.asiaone.com/a1mborss/News.xml'),
  27.                       ('Business', 'http://www.asiaone.com/a1mborss/Business.xml'),
  28.                       ('Education', 'http://www.asiaone.com/a1mborss/Education.xml'),
  29.                       ('Health', 'http://www.asiaone.com/a1mborss/Health.xml'),
  30.                       ('Digital', 'http://www.asiaone.com/a1mborss/Digital.xml'),
  31.                     ]
  32.  
  33.     def print_version(self, url):
  34.         return url.replace('http://www.asiaone.com/', 'http://www.asiaone.com/print/')
  35.