home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_4036 < prev    next >
Encoding:
Text File  |  2010-06-16  |  1.5 KB  |  42 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> edited by Huan T'
  7.  
  8. from calibre.web.feeds.news import BasicNewsRecipe
  9.  
  10. class Slashdot(BasicNewsRecipe):
  11.              title          = u'Slashdot.org'
  12.              description    = '''Tech news. WARNING: This recipe downloads a lot
  13.              of content and may result in your IP being banned from slashdot.org'''
  14.              oldest_article = 7
  15.              simultaneous_downloads = 1
  16.              delay = 3
  17.              max_articles_per_feed = 100
  18.              language = 'en'
  19.  
  20.              __author__ = 'floweros edited by Huan T'
  21.              no_stylesheets = True
  22. #             keep_only_tags = [
  23. #                 dict(name='div',attrs={'class':'article'}),
  24. #                 dict(name='div',attrs={'class':'commentTop'}),
  25. #                 ]
  26.  
  27.              feeds          = [
  28.                  (u'Slashdot',
  29.  u'http://rss.slashdot.org/Slashdot/slashdot'),
  30.                  (u'/. IT',
  31.  u'http://rss.slashdot.org/Slashdot/slashdotIT'),
  32.                  (u'/. Hardware',
  33.  u'http://rss.slashdot.org/Slashdot/slashdotHardware'),
  34.                  (u'/. Linux',
  35.  u'http://rss.slashdot.org/Slashdot/slashdotLinux'),
  36.                  (u'/. Your Rights Online',
  37.  u'http://rss.slashdot.org/Slashdot/slashdotYourRightsOnline')
  38.                  ]
  39.  
  40.              def get_article_url(self, article):
  41.                           return article.get('feedburner_origlink', None)
  42.