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

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2.  
  3. class NewsandObserver(BasicNewsRecipe):
  4.     title          = u'Raleigh News & Observer'
  5.     description = 'News from Raleigh, North Carolina'
  6.     language       = 'en'
  7.     __author__     = 'Krittika Goyal updated by Walt Anthony'
  8.     oldest_article = 3 #days
  9.     max_articles_per_feed = 25
  10.     summary_length = 150
  11.  
  12.     no_stylesheets    = True
  13.     remove_javascript = True
  14.  
  15.     remove_tags_before = dict(name='h1', attrs={'id':'story_headline'})
  16.     remove_tags_after   = dict(name='div', attrs={'id':'story_text_remaining'})
  17.  
  18.  
  19.     remove_tags = [
  20.        dict(name='iframe'),
  21.        dict(name='div', attrs={'id':['right-rail', 'story_tools', 'toolbox', 'toolbar', 'tool', 'shirttail', 'comment_widget', 'story_keywords', 'txtResizeTool']}),
  22.        dict(name='div', attrs={'class':['Buy-It-Now', 'story_link_share']}),
  23.        dict(name='ul', attrs={'class':'bold_tabs_nav'}),
  24.  
  25.     ]
  26.  
  27.  
  28.  
  29.     feeds = [
  30.        ('Cover', 'http://www.newsobserver.com/100/index.rss'),
  31.        ('News', 'http://www.newsobserver.com/102/index.rss'),
  32.        ('Politics', 'http://www.newsobserver.com/105/index.rss'),
  33.        ('Business', 'http://www.newsobserver.com/104/index.rss'),
  34.        ('Sports', 'http://www.newsobserver.com/103/index.rss'),
  35.        ('College Sports', 'http://www.newsobserver.com/119/index.rss'),
  36.        ('Lifestyles', 'http://www.newsobserver.com/106/index.rss'),
  37.        ('Editorials', 'http://www.newsobserver.com/158/index.rss')
  38.     ]
  39.  
  40.  
  41.