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_tech.recipe < prev    next >
Text File  |  2011-09-09  |  2KB  |  47 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://pogue.blogs.nytimes.com/
  10. """
  11.  
  12. from calibre.web.feeds.news import BasicNewsRecipe
  13.  
  14.  
  15. class NYTimesTechnology(BasicNewsRecipe):
  16.     title = 'New York Times Technology Beat'
  17.     language = 'en'
  18.     __author__ = 'David Pogue'
  19.     description = 'The latest in technology from David Pogue'
  20.     publisher = 'The New York Times'
  21.     category = 'Technology'
  22.     oldest_article = 14
  23.     max_articles_per_feed = 25
  24.     no_stylesheets = True
  25.     language = 'en'
  26.     cover_url ='http://bit.ly/g0SKJT'
  27.     feeds = [
  28.                (u'Pogues Posts', u'http://pogue.blogs.nytimes.com/feed/'),
  29.                (u'Bits', u'http://bits.blogs.nytimes.com/feed/'),
  30.                (u'Gadgetwise', u'http://gadgetwise.blogs.nytimes.com/feed/'),
  31.                (u'Open', u'http://open.blogs.nytimes.com/feed/')
  32.                    ]
  33.     keep_only_tags = [dict(name='div', attrs={'id':'header'}),
  34.             dict(name='h1'),
  35.             dict(name='h2'),
  36.             dict(name='div', attrs={'class':'entry-content'})]
  37.     extra_css = '''
  38.            h1{font-family:Arial,Helvetica,sans-serif;
  39.                font-weight:bold;font-size:large;}
  40.  
  41.            h2{font-family:Arial,Helvetica,sans-serif;
  42.                font-weight:normal;font-size:small;}
  43.  
  44.            p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
  45.            body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
  46.                '''
  47.