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

  1.  
  2. from calibre.web.feeds.news import BasicNewsRecipe
  3.  
  4. class CommonDreams(BasicNewsRecipe):
  5.     # Identify the recipe
  6.     
  7.     title          = u'Common Dreams'
  8.     description    = u'Progressive news and views'
  9.     __author__     = u'XanthanGum'
  10.     language = 'en'
  11.     
  12.     # Format the text
  13.     
  14.     extra_css = '''
  15.                  body{font-family:verdana,arial,helvetica,geneva,sans-serif ;}
  16.                  h1{font-size: xx-large;}
  17.                  h2{font-size: large;}
  18.                 '''
  19.  
  20.     # Pick no article older than seven days and limit the number of articles per feed to 100
  21.     
  22.     oldest_article = 7
  23.     max_articles_per_feed = 100
  24.     
  25.     # Remove everything before the article
  26.     
  27.     remove_tags_before = dict(name = 'div', attrs = {'id':'node-header'})
  28.     
  29.     # Remove everything after the article
  30.     
  31.     remove_tags_after = dict(name = 'div', attrs = {'class':'copyright-info'})
  32.     
  33.     # Identify the news feeds
  34.     
  35.     feeds = [(u'Headlines', u'http://www.commondreams.org/feed/headlines_rss'),
  36.              (u'Further News Articles', u'http://www.commondreams.org/feed/further_rss'), 
  37.              (u'Views', u'http://www.commondreams.org/feed/views_rss'), 
  38.              (u'Progressive Newswire', u'http://www.commondreams.org/feed/newswire_rss')]
  39.