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

  1. # -*- coding: utf-8 -*-
  2. #!/usr/bin/env  python
  3.  
  4. __license__   = 'GPL v3'
  5. __copyright__ = u'2011, Silviu Cotoar\u0103'
  6. '''
  7. tabu.ro
  8. '''
  9.  
  10. from calibre.web.feeds.news import BasicNewsRecipe
  11.  
  12. class TabuRo(BasicNewsRecipe):
  13.     title                 = u'Tabu'
  14.     __author__            = u'Silviu Cotoar\u0103'
  15.     description           = 'Cel mai curajos site de femei'
  16.     publisher             = 'Tabu'
  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,Femei'
  23.     encoding              = 'utf-8'
  24.     cover_url             = 'http://www.tabu.ro/img/tabu-logo2.png'
  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='h2', attrs={'class':'articol_titlu'}),
  35.                         dict(name='div', attrs={'class':'poza_articol_featured'}),
  36.                         dict(name='div', attrs={'class':'articol_text'})
  37.                      ]
  38.  
  39.     remove_tags = [
  40.             dict(name='div', attrs={'class':'asemanatoare'}),
  41.              dict(name='div', attrs={'class':'social'})
  42.                            ]
  43.  
  44.     remove_tags_after = [
  45.                       dict(name='div', attrs={'class':'social'}),
  46.                       dict(name='div', attrs={'id':'comments'}),
  47.                       dict(name='div', attrs={'class':'asemanatoare'})
  48.                         ]
  49.  
  50.     feeds          = [
  51.                         (u'Feeds', u'http://www.tabu.ro/feed/')
  52.                      ]
  53.  
  54.     def preprocess_html(self, soup):
  55.         return self.adeify_images(soup)
  56.