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

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2010, Walt Anthony <workshop.northpole at gmail.com>'
  3. '''
  4. www.michellemalkin.com
  5. '''
  6. from calibre.web.feeds.news import BasicNewsRecipe
  7.  
  8. class MichelleMalkin(BasicNewsRecipe):
  9.     title          = u'Michelle Malkin'
  10.     description    = "Michelle Malkin's take on events, a mother, wife, blogger, conservative syndicated columnist, author, and Fox News Channel contributor."
  11.     __author__     = 'Walt Anthony'
  12.     publisher             = 'Michelle Malkin LLC'
  13.     category              = 'news, politics, USA'
  14.     oldest_article        = 7 #days
  15.     max_articles_per_feed = 50
  16.     summary_length        = 150
  17.     language              = 'en'
  18.  
  19.     remove_javascript     = True
  20.     no_stylesheets        = True
  21.  
  22.  
  23.     conversion_options = {
  24.                           'comment'   : description
  25.                         , 'tags'      : category
  26.                         , 'publisher' : publisher
  27.                         , 'language'  : language
  28.                         , 'linearize_tables' : True
  29.                         }
  30.  
  31.  
  32.     keep_only_tags = [
  33.       dict(name='div', attrs={'class':'article'})
  34.     ]
  35.  
  36.     remove_tags  = [
  37.        dict(name=['iframe', 'embed', 'object']),
  38.        dict(name='div', attrs={'id':['comments', 'commentForm']}),
  39.        dict(name='div', attrs={'class':['postCategories', 'comments', 'blogInfo', 'postInfo']})
  40.  
  41.     ]
  42.  
  43.  
  44.     feeds = [(u'http://feeds.feedburner.com/michellemalkin/posts')]
  45.  
  46.  
  47.  
  48.     def print_version(self, url):
  49.         return url + '?print=1'
  50.