home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_4017 < prev    next >
Encoding:
Text File  |  2009-10-14  |  1.7 KB  |  47 lines

  1. #!/usr/bin/env python
  2. # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
  3. from __future__ import with_statement
  4.  
  5. __license__   = 'GPL v3'
  6. __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
  7. __docformat__ = 'restructuredtext en'
  8.  
  9. from calibre.web.feeds.news import BasicNewsRecipe
  10.  
  11.  
  12. class Salon_com(BasicNewsRecipe):
  13.     title = 'Salon.com'
  14.     __author__ = 'cix3'
  15.     description = 'Salon.com - Breaking news, opinion, politics, entertainment, sports and culture.'
  16.     timefmt = ' [%b %d, %Y]'
  17.     language = 'en'
  18.  
  19.     oldest_article = 7
  20.     max_articles_per_feed = 100
  21.  
  22.     remove_tags = [dict(name='div', attrs={'class':['ad_content', 'clearfix']}), dict(name='hr'), dict(name='img')]
  23.  
  24.     remove_tags_before = dict(name='h2')
  25.  
  26.     feeds = [
  27.         ('News & Politics', 'http://feeds.salon.com/salon/news'),
  28.         ('War Room', 'http://feeds.salon.com/salon/war_room'),
  29.         ('Arts & Entertainment', 'http://feeds.salon.com/salon/ent'),
  30.         ('I Like to Watch', 'http://feeds.salon.com/salon/iltw'),
  31.         ('Beyond Multiplex', 'http://feeds.salon.com/salon/btm'),
  32.         ('Book Reviews', 'http://feeds.salon.com/salon/books'),
  33.         ('All Life', 'http://feeds.salon.com/salon/mwt'),
  34.         ('All Opinion', 'http://feeds.salon.com/salon/opinion'),
  35.         ('Glenn Greenwald', 'http://feeds.salon.com/salon/greenwald'),
  36.         ('Garrison Keillor', 'http://dir.salon.com/topics/garrison_keillor/index.rss'),
  37.         ('Joan Walsh', 'http://www.salon.com/rss/walsh.rss'),
  38.         ('All Sports', 'http://feeds.salon.com/salon/sports'),
  39.         ('Tech & Business', 'http://feeds.salon.com/salon/tech'),
  40.         ('How World Works', 'http://feeds.salon.com/salon/htww')
  41.             ]
  42.  
  43.     def print_version(self, url):
  44.         return url.replace('/index.html', '/print.html')
  45.  
  46.  
  47.