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

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2010, NA'
  3. '''
  4. gawker.com
  5. '''
  6.  
  7. from calibre.web.feeds.news import BasicNewsRecipe
  8.  
  9. class Gawker(BasicNewsRecipe):
  10.     title                 = 'Gawker'
  11.     __author__            = 'NA'
  12.     description           = "Gawker, Gossip from Manhattan and the Beltway to Hollywood and the Valley."
  13.     publisher             = 'gawker.com'
  14.     category              = 'news, gossip'
  15.     oldest_article        = 2
  16.     max_articles_per_feed = 100
  17.     no_stylesheets        = True
  18.     encoding              = 'utf-8'
  19.     use_embedded_content  = True
  20.     language              = 'en'
  21.     masthead_url          = 'http://cache.gawkerassets.com/assets/gawker.com/img/logo.png'
  22.  
  23.     conversion_options = {
  24.                           'comment'   : description
  25.                         , 'tags'      : category
  26.                         , 'publisher' : publisher
  27.                         , 'language'  : language
  28.                         }
  29.  
  30.     remove_tags = [
  31.             {'class': 'feedflare'},
  32.     ]
  33.  
  34.     feeds = [(u'Articles', u'http://feeds.gawker.com/gawker/vip?format=xml')]
  35.  
  36.     def preprocess_html(self, soup):
  37.         return self.adeify_images(soup)
  38.  
  39.