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

  1. #!/usr/bin/env  python
  2.  
  3. from calibre.web.feeds.recipes import BasicNewsRecipe
  4.  
  5. class SeanHannity(BasicNewsRecipe):
  6.     cover_url             = 'http://www.hannity.com/images/misc_logo.gif'
  7.     title                      = u"Sean Hannity Show"
  8.     __author__               = 'Rob Lammert - rob.lammert[at]gmail.com'
  9.     description                = u"Articles from Sean Hannity's website, www.hannity.com"
  10.     oldest_article        = 7.0
  11.     language = 'en'
  12.     max_articles_per_feed = 100
  13.     recursions            = 0
  14.     encoding              = 'utf8'
  15.     no_stylesheets        = True
  16.     remove_javascript     = True
  17.     #use_embedded_content  = False
  18.  
  19.     remove_tags    = [
  20.       dict(name='div', attrs={'id':['header','navsprite','topminibarad','headline_bar','shadow','footer']}),
  21.       dict(name='div', attrs={'class':'rightcolumn'}),
  22.       dict(name='table', attrs={'id':'audiobox'}),
  23.       dict(name='a', attrs={'title':['Home','Shows','Guests','Photos']}),
  24.       dict(name='iframe')
  25.     ]
  26.  
  27.     feeds          = [
  28.          ('Content Feed', u'http://feeds.feedburner.com/TheSeanHannityShow-AllContent?format=xml')
  29.     ]
  30.  
  31.  
  32.  
  33.   #def print_version(self, url):
  34.     #parts=url.split('/')
  35.     #return url.replace(url, 'http://www.hannity.com/show/' + parts[4] + '/' + parts[5] + '/' + parts[6] + '?mode=print')
  36.  
  37.