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

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2.  
  3. class PolitiFactCom(BasicNewsRecipe):
  4.     title          = u'Politifact'
  5.     __author__     = u'Michael Heinz'
  6.     oldest_article = 21
  7.     max_articles_per_feed = 100
  8.     language = 'en'
  9.  
  10.     no_stylesheets = True
  11.  
  12.     publication_type = 'magazine'
  13.     masthead_url = 'http://static.politifact.com.s3.amazonaws.com/images/politifactdotcom-flag-fff_01.png'
  14.     cover_url = 'http://static.politifact.com.s3.amazonaws.com/images/politifactdotcom-flag-fff_01.png'
  15.  
  16.     remove_tags = [
  17.                      dict(name='div', attrs={'class':'pfstoryarchive'}),
  18.                      dict(name='div', attrs={'class':'pfhead'}),
  19.                      dict(name='div', attrs={'class':'boxmid'}),
  20.                   ]
  21.  
  22.     keep_only_tags = [dict(name='div', attrs={'class':'pfcontentleft'})]
  23.     feeds          = [
  24.                      (u'Articles', u'http://www.politifact.com/feeds/articles/truth-o-meter/'),
  25.                      (u'Obamameter', u'http://politifact.com/feeds/updates/'),
  26.                      (u'Statements', u'http://www.politifact.com/feeds/statements/truth-o-meter/')
  27.                      ]
  28.  
  29.     def get_browser(self):
  30.         br = BasicNewsRecipe.get_browser(self)
  31.         br.set_handle_gzip(True)
  32.         return br
  33.