home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_3929 < prev    next >
Encoding:
Text File  |  2010-03-06  |  1.4 KB  |  34 lines

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2.  
  3. class NewsAndObserver(BasicNewsRecipe):
  4.     title          = u'News And Observer'
  5.     language       = 'en'
  6.     __author__     = 'Krittika Goyal'
  7.     oldest_article = 1 #days
  8.     max_articles_per_feed = 25
  9.     #encoding = 'latin1'
  10.  
  11.     no_stylesheets = True
  12.     remove_tags_before = dict(name='div', attrs={'id':'story_header'})
  13.     remove_tags_after  = dict(name='div', attrs={'id':'shirttail'})
  14.     remove_tags = [
  15.        dict(name='iframe'),
  16.        dict(name='div', attrs={'class':['contained_round', 'contained']}),
  17.        dict(name='div', attrs={'id':['story_tools', 'toolbox', 'shirttail', 'comment_widget', 'stories_widget', 'classifieds_widget', 'most_popular_widget', 'footer']}),
  18.        #dict(name='ul', attrs={'class':'article-tools'}),
  19.        dict(name='ul', attrs={'id':'story_tabs'}),
  20.     ]
  21.  
  22.  
  23.     feeds = [
  24.         ('Cover', 'http://www.newsobserver.com/100/index.rss'),
  25.         ('News', 'http://www.newsobserver.com/102/index.rss'),
  26.         ('Politics', 'http://www.newsobserver.com/105/index.rss'),
  27.         ('Business', 'http://www.newsobserver.com/104/index.rss'),
  28.         ('Sports', 'http://www.newsobserver.com/103/index.rss'),
  29.         ('College Sports', 'http://www.newsobserver.com/119/index.rss'),
  30.         ('Lifestyles', 'http://www.newsobserver.com/106/index.rss'),
  31.         ('Editorials', 'http://www.newsobserver.com/158/index.rss')]
  32.  
  33.  
  34.