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

  1.  
  2. __license__   = 'GPL v3'
  3. __copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
  4. '''
  5. www.reptantes.com.ar
  6. '''
  7.  
  8. from calibre.web.feeds.news import BasicNewsRecipe
  9.  
  10. class Reptantes(BasicNewsRecipe):
  11.     title                 = 'Reptantes'
  12.     __author__            = 'Darko Miletic'
  13.     description           = u"cada vez que te haces acupuntura, tu mu├▒eco vud├║ sufre en alg├║n lado"
  14.     oldest_article        = 130
  15.     max_articles_per_feed = 100
  16.     language              = 'es_AR'
  17.     encoding              = 'utf-8'
  18.     no_stylesheets        = True
  19.     use_embedded_content  = False
  20.     publication_type      = 'blog'
  21.     extra_css             = ' body{font-family: "Palatino Linotype",serif} h2{text-align: center; color:#BE7F8D} img{margin-bottom: 2em} '
  22.  
  23.     conversion_options = {
  24.                           'comment'  : description
  25.                         , 'tags'     : 'literatura'
  26.                         , 'publisher': 'Hernan Racnati'
  27.                         , 'language' : language
  28.                         }
  29.  
  30.     feeds = [(u'Posts', u'http://www.reptantes.com.ar/?feed=rss2')]
  31.  
  32.     keep_only_tags     = [dict(attrs={'id':'content'})]
  33.     remove_tags        = [dict(attrs={'class':'iLikeThis'})]
  34.     remove_tags_before = dict(name='h2')
  35.     remove_tags_after  = dict(attrs={'class':'iLikeThis'})
  36.  
  37.  
  38.     def preprocess_html(self, soup):
  39.         for item in soup.findAll(style=True):
  40.             del item['style']
  41.         return self.adeify_images(soup)
  42.  
  43.  
  44.