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

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2011, Seongkyoun Yoo <Seongkyoun.yoo at gmail.com>'
  3. '''
  4. Profile to download KoreaHerald
  5. '''
  6. from calibre.web.feeds.news import BasicNewsRecipe
  7.  
  8. class KoreaHerald(BasicNewsRecipe):
  9.     title          = u'KoreaHerald'
  10.     language = 'en'
  11.     description = u'Korea Herald News articles'
  12.     __author__    = 'Seongkyoun Yoo'
  13.     oldest_article = 10
  14.     recursions = 3
  15.     max_articles_per_feed = 10
  16.     no_stylesheets         = True
  17.     keep_only_tags    = [
  18.                         dict(id=['contentLeft', '_article'])
  19.                         ]
  20.  
  21.     remove_tags = [
  22.        dict(name='iframe'),
  23.        dict(name='div', attrs={'class':['left','htit2', 'navigation','banner_txt','banner_img']}),
  24.        dict(name='ul', attrs={'class':['link_icon', 'flow_icon','detailTextAD110113']}),
  25.        ]
  26.  
  27.     feeds = [
  28.     ('All News','http://www.koreaherald.com/rss/020000000000.xml'),
  29.     ('National','http://www.koreaherald.com/rss/020100000000.xml'),
  30.     ('Business','http://www.koreaherald.com/rss/020200000000.xml'),
  31.     ('Life&Style','http://www.koreaherald.com/rss/020300000000.xml'),
  32.     ('Entertainment','http://www.koreaherald.com/rss/020400000000.xml'),
  33.     ('Sports','http://www.koreaherald.com/rss/020500000000.xml'),
  34.     ('Opinion','http://www.koreaherald.com/rss/020600000000.xml'),
  35.     ('English Cafe','http://www.koreaherald.com/rss/021000000000.xml'),
  36.     ]
  37.