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

  1. # -*- coding: utf-8 -*-
  2. #!/usr/bin/env  python
  3.  
  4. __license__   = 'GPL v3'
  5. __copyright__ = u'2011, '
  6. '''
  7. replicavedetelor.ro
  8. '''
  9.  
  10. from calibre.web.feeds.news import BasicNewsRecipe
  11.  
  12. class ReplicaVedetelor(BasicNewsRecipe):
  13.     title                 = u'Replica Vedetelor'
  14.     __author__            = u'Silviu Cotoara'
  15.     description           = u'Ofer\u0103 vedetelor dreptul la replic\u0103'
  16.     publisher             = 'Replica Vedetelor'
  17.     oldest_article        = 5
  18.     language              = 'ro'
  19.     max_articles_per_feed = 100
  20.     no_stylesheets        = True
  21.     use_embedded_content  = False
  22.     category              = 'Ziare,Reviste,Vedete'
  23.     encoding              = 'utf-8'
  24.     cover_url             = 'http://www.webart-software.eu/_pics/lucrari_referinta/medium/84/1-Replica-Vedetelor.jpg'
  25.  
  26.     conversion_options = {
  27.                              'comments'   : description
  28.                             ,'tags'       : category
  29.                             ,'language'   : language
  30.                             ,'publisher'  : publisher
  31.                          }
  32.  
  33.     keep_only_tags = [
  34.             dict(name='div', attrs={'id':'zona-continut'})
  35.                      ]
  36.  
  37.     remove_tags = [
  38.              dict(name='ul', attrs={'id':['lista-imagini']})
  39.            , dict(name='form', attrs={'id':['f-trimite-unui-prieten']})
  40.  
  41.                   ]
  42.  
  43.     remove_tags_after = [
  44.               dict(name='form', attrs={'id':['f-trimite-unui-prieten']})
  45.             ]
  46.  
  47.     feeds          = [
  48.             (u'Feeds', u'http://www.replicavedetelor.ro/feed')
  49.                  ]
  50.  
  51.     def preprocess_html(self, soup):
  52.         return self.adeify_images(soup)
  53.  
  54.