home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Narzedzia / Calibre / calibre-0.8.18.msi / file_280 / 7seri.recipe < prev    next >
Encoding:
Text File  |  2011-09-09  |  1.7 KB  |  52 lines

  1. # -*- coding: utf-8 -*-
  2. #!/usr/bin/env  python
  3.  
  4. __license__   = 'GPL v3'
  5. __copyright__ = u'2011, Silviu Cotoar\u0103'
  6. '''
  7. sapteseri.ro
  8. '''
  9.  
  10. from calibre.web.feeds.news import BasicNewsRecipe
  11.  
  12. class SapteSeri(BasicNewsRecipe):
  13.     title                 = u'Sapte Seri'
  14.     __author__            = u'Silviu Cotoar\u0103'
  15.     description           = u'Sapte Seri'
  16.     publisher             = u'Sapte Seri'
  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,Oras,Distractie,Fun'
  23.     encoding              = 'utf-8'
  24.     remove_empty_feeds    = True
  25.     remove_javascript     = True
  26.     cover_url             = 'http://www.sapteseri.ro/Images/logo.jpg'
  27.  
  28.     conversion_options = {
  29.                              'comments'   : description
  30.                             ,'tags'       : category
  31.                             ,'language'   : language
  32.                             ,'publisher'  : publisher
  33.                          }
  34.  
  35.     keep_only_tags = [
  36.                           dict(name='h1', attrs={'id':'title'})
  37.                         , dict(name='div', attrs={'class':'mt10 mb10'})
  38.                         , dict(name='div', attrs={'class':'mb20 mt10'})
  39.                         , dict(name='div', attrs={'class':'mt5 mb20'})
  40.                      ]
  41.  
  42.     remove_tags = [
  43.                     dict(name='div', attrs={'id':['entityimgworking']})
  44.                    ]
  45.  
  46.     feeds          = [
  47.                         (u'Ce se intampla azi in Bucuresti', u'http://www.sapteseri.ro/ro/feed/ce-se-intampla-azi/bucuresti/')
  48.                     ]
  49.  
  50.     def preprocess_html(self, soup):
  51.         return self.adeify_images(soup)
  52.