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

  1. # -*- coding: utf-8 -*-
  2. #!/usr/bin/env  python
  3.  
  4. __license__   = 'GPL v3'
  5. __copyright__ = u'2011, Silviu Cotoar\u0103'
  6. '''
  7. gandul.info
  8. '''
  9.  
  10. from calibre.web.feeds.news import BasicNewsRecipe
  11.  
  12. class Gandul(BasicNewsRecipe):
  13.     title                 = u'G\u00E2ndul'
  14.     __author__            = u'Silviu Cotoar\u0103'
  15.     publisher             = 'Gandul'
  16.     description           = 'Cotidian Online'
  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,Stiri,Romania'
  23.     encoding              = 'utf-8'
  24.     cover_url         = 'http://storage0.dms.mpinteractiv.ro/media/1/1/1706/1064063/1/logo.jpg?width=400'
  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={'class':'article'})
  35.              ]
  36.  
  37.     remove_tags = [
  38.              dict(name='a', attrs={'class':'photo'})
  39.            , dict(name='div', attrs={'class':'ad'})
  40.                   ]
  41.  
  42.     feeds  = [
  43.         (u'\u0218tiri', u'http://www.gandul.info/rss-stiri-prima-pagina.xml')
  44.          ]
  45.  
  46.     def preprocess_html(self, soup):
  47.         return self.adeify_images(soup)
  48.