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

  1. #!/usr/bin/env python
  2. # encoding: utf-8
  3.  
  4. from __future__ import with_statement
  5. __license__ = 'GPL 3'
  6. __copyright__ = 'zotzo'
  7. __docformat__ = 'restructuredtext en'
  8. """
  9. http://fifthdown.blogs.nytimes.com/
  10. http://offthedribble.blogs.nytimes.com/
  11. http://thequad.blogs.nytimes.com/
  12. http://slapshot.blogs.nytimes.com/
  13. http://goal.blogs.nytimes.com/
  14. http://bats.blogs.nytimes.com/
  15. http://straightsets.blogs.nytimes.com/
  16. http://formulaone.blogs.nytimes.com/
  17. http://onpar.blogs.nytimes.com/
  18. """
  19.  
  20. from calibre.web.feeds.news import BasicNewsRecipe
  21.  
  22.  
  23. class NYTimesSports(BasicNewsRecipe):
  24.     title = 'New York Times Sports Beat'
  25.     language = 'en'
  26.     __author__ = 'rylsfan'
  27.     description = 'Indepth sports from the New York Times'
  28.     publisher = 'The New York Times'
  29.     category = 'Sports'
  30.     oldest_article = 3
  31.     max_articles_per_feed = 25
  32.     no_stylesheets = True
  33.     language = 'en'
  34.     #cover_url ='http://bit.ly/h8F4DO'
  35.     feeds = [
  36.                (u'The Fifth Down', u'http://fifthdown.blogs.nytimes.com/feed/'),
  37.                (u'Off The Dribble', u'http://offthedribble.blogs.nytimes.com/feed/'),
  38.                (u'The Quad', u'http://thequad.blogs.nytimes.com/feed/'),
  39.                (u'Slap Shot', u'http://slapshot.blogs.nytimes.com/feed/'),
  40.                (u'Goal', u'http://goal.blogs.nytimes.com/feed/'),
  41.                (u'Bats', u'http://bats.blogs.nytimes.com/feed/'),
  42.                (u'Straight Sets', u'http://straightsets.blogs.nytimes.com/feed/'),
  43.                (u'Formula One', u'http://formulaone.blogs.nytimes.com/feed/'),
  44.                (u'On Par', u'http://onpar.blogs.nytimes.com/feed/'),
  45.            ]
  46.     keep_only_tags = [dict(name='div', attrs={'id':'header'}),
  47.             dict(name='h1'),
  48.             dict(name='h2'),
  49.             dict(name='div', attrs={'class':'entry-content'})]
  50.     extra_css =    '''
  51.            h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
  52.            h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
  53.            p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
  54.            body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
  55.                    '''
  56.