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

  1.  
  2. __license__   = 'GPL v3'
  3. __copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
  4. '''
  5. www.kitsapun.com
  6. '''
  7.  
  8. from calibre.web.feeds.news import BasicNewsRecipe
  9.  
  10. class Kitsapsun(BasicNewsRecipe):
  11.     title                 = 'Kitsap Sun'
  12.     __author__            = 'Darko Miletic'
  13.     description           = 'News from Kitsap County'
  14.     publisher             = 'Scripps Interactive Newspapers Group'
  15.     category              = 'news, Kitsap county, USA'    
  16.     language              = 'en'
  17.     oldest_article        = 2
  18.     max_articles_per_feed = 100
  19.     no_stylesheets        = True
  20.     encoding              = 'cp1252'
  21.     use_embedded_content  = False
  22.  
  23.     conversion_options = {  
  24.                              'comments' : description
  25.                             ,'tags'     : category
  26.                             ,'language' : language
  27.                             ,'publisher': publisher
  28.                          }
  29.  
  30.     
  31.     keep_only_tags = [dict(name='div', attrs={'id':['story_meta','story_content']})]
  32.  
  33.     remove_tags = [dict(name=['object','link','embed','form','iframe'])]
  34.                   
  35.     feeds = [
  36.                (u'News'         , u'http://www.kitsapsun.com/rss/headlines/news/'         )
  37.               ,(u'Business'     , u'http://www.kitsapsun.com/rss/headlines/business/'     )
  38.               ,(u'Communities'  , u'http://www.kitsapsun.com/rss/headlines/communities/'  )
  39.               ,(u'Entertainment', u'http://www.kitsapsun.com/rss/headlines/entertainment/')
  40.               ,(u'Lifestyles'   , u'http://www.kitsapsun.com/rss/headlines/lifestyles/'   )
  41.             ]
  42.     
  43.     def print_version(self, url):
  44.         return url.rpartition('/')[0] + '/?print=1'
  45.