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

  1. # -*- coding: utf-8 -*-
  2. #!/usr/bin/env  python
  3.  
  4. __license__   = 'GPL v3'
  5. __copyright__ = u'2011, Silviu Cotoar\u0103'
  6. '''
  7. capital.ro
  8. '''
  9.  
  10. from calibre.web.feeds.news import BasicNewsRecipe
  11.  
  12. class Capital(BasicNewsRecipe):
  13.     title                 = 'Capital'
  14.     __author__            = u'Silviu Cotoar\u0103'
  15.     description           = u'\u0218tiri din Rom\u00e2nia'
  16.     oldest_article        = 5
  17.     language              = 'ro'
  18.     max_articles_per_feed = 100
  19.     no_stylesheets        = True
  20.     use_embedded_content  = False
  21.     category              = 'Ziare,Stiri,Romania'
  22.     encoding              = 'utf-8'
  23.     remove_javascript     = True
  24.     publisher             = 'Capital'
  25.     cover_url         = 'http://www.mediapress.ro/imagini/sigla-capital-s16.gif'
  26.  
  27.     conversion_options = {
  28.                              'comments'   : description
  29.                             ,'tags'       : category
  30.                 ,'language'   : language
  31.                 ,'publisher'  : publisher
  32.                          }
  33.  
  34.     keep_only_tags = [  dict(name='div', attrs={'class':'single one_article'})
  35.                      ]
  36.  
  37.     remove_tags = [  dict(name='div', attrs={'class':'single_details'})
  38.                    , dict(name='div', attrs={'class':'tx-addoceansbanners-pi1'})
  39.           ]
  40.  
  41.     feeds = [(u'\u0218tiri', u'http://www.capital.ro/rss.html') ]
  42.  
  43.     def preprocess_html(self, soup):
  44.         return self.adeify_images(soup)
  45.