home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_4092 < prev    next >
Encoding:
Text File  |  2010-01-22  |  1.9 KB  |  50 lines

  1.  
  2. __license__   = 'GPL v3'
  3. __copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
  4. '''
  5. www.theweek.com
  6. '''
  7.  
  8. from calibre.web.feeds.news import BasicNewsRecipe
  9.  
  10. class TheWeekFree(BasicNewsRecipe):
  11.     title                 = 'The Week Magazine - Free content'
  12.     __author__            = 'Darko Miletic'
  13.     description           = "The best of the US and international media.  Daily coverage of commentary and analysis of the day's events, as well as arts, entertainment, people and gossip, and political cartoons."
  14.     publisher             = 'The Week Publications, Inc.'
  15.     category              = 'news, politics, USA'
  16.     oldest_article        = 7
  17.     max_articles_per_feed = 100
  18.     no_stylesheets        = True
  19.     encoding              = 'utf-8'
  20.     use_embedded_content  = False
  21.     language              = 'en'
  22.  
  23.     conversion_options = {
  24.                           'comment'   : description
  25.                         , 'tags'      : category
  26.                         , 'publisher' : publisher
  27.                         , 'language'  : language
  28.                         }
  29.  
  30.     keep_only_tags = [
  31.                         dict(name=['h1','h2'])
  32.                       , dict(name='div', attrs={'class':'basefont'})
  33.                       , dict(name='div', attrs={'id':'slideshowLoader'})
  34.                      ]
  35.  
  36.     remove_tags = [
  37.                      dict(name='div', attrs={'id':['digg_dugg','articleRight','dateHeader']})
  38.                     ,dict(name=['object','embed','iframe'])
  39.                   ]
  40.  
  41.  
  42.     feeds = [
  43.               (u'News & Opinions'       , u'http://www.theweek.com/section/index/news_opinion.rss')
  44.              ,(u'Arts & Leisure'        , u'http://www.theweek.com/section/index/arts_leisure.rss')
  45.              ,(u'Business'              , u'http://www.theweek.com/section/index/business.rss'    )
  46.              ,(u'Cartoon & Short takes' , u'http://www.theweek.com/section/index/cartoons_wit.rss')
  47.             ]
  48.  
  49.  
  50.