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

  1. #!/usr/bin/env  python
  2.  
  3. __license__   = 'GPL v3'
  4. __copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
  5. '''
  6. newyorker.com
  7. '''
  8.  
  9. from calibre.web.feeds.news import BasicNewsRecipe
  10.  
  11. class CubaDebate(BasicNewsRecipe):
  12.     title                 = 'CubaDebate'
  13.     __author__            = 'Darko Miletic'
  14.     description           = 'Contra el Terorismo Mediatico'
  15.     oldest_article        = 15
  16.     language = 'es'
  17.  
  18.     max_articles_per_feed = 100
  19.     no_stylesheets        = True
  20.     use_embedded_content  = False
  21.     publisher             = 'Cubadebate'
  22.     category              = 'news, politics, Cuba'
  23.     encoding              = 'utf-8'
  24.     extra_css             = ' #BlogTitle{font-size: x-large; font-weight: bold} '
  25.  
  26.     conversion_options = {
  27.                              'comments'    : description
  28.                             ,'tags'        : category
  29.                             ,'language'    : 'es'
  30.                             ,'publisher'   : publisher
  31.                             ,'pretty_print': True
  32.                          }
  33.  
  34.     keep_only_tags = [dict(name='div', attrs={'id':'Outline'})]
  35.     remove_tags_after = dict(name='div',attrs={'id':'BlogContent'})
  36.     remove_tags = [dict(name='link')]
  37.  
  38.     feeds          = [(u'Articulos', u'http://www.cubadebate.cu/feed/')]
  39.  
  40.     def print_version(self, url):
  41.         return url + 'print/'
  42.  
  43.     def preprocess_html(self, soup):
  44.         return self.adeify_images(soup)
  45.