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

  1. # -*- coding: utf-8 -*-
  2. #!/usr/bin/env  python
  3.  
  4. __license__   = 'GPL v3'
  5. __copyright__ = u'2011, Silviu Cotoar\u0103'
  6. '''
  7. azi.md
  8. '''
  9.  
  10. from calibre.web.feeds.news import BasicNewsRecipe
  11.  
  12. class MoldovaAzi(BasicNewsRecipe):
  13.     title                 = u'Moldova Azi'
  14.     language              = 'ro'
  15.     __author__            = u'Silviu Cotoar\u0103'
  16.     description           = u'Moldova pe internet'
  17.     publisher             = 'Moldova Azi'
  18.     category              = 'Ziare,Stiri,Moldova'
  19.     oldest_article        = 5
  20.     max_articles_per_feed = 100
  21.     no_stylesheets        = True
  22.     use_embedded_content  = False
  23.     encoding              = 'utf-8'
  24.     remove_javascript     = True
  25.     cover_url             = 'http://www.azi.md/images/logo.gif'
  26.  
  27.     conversion_options = {
  28.                              'comments'   : description
  29.                             ,'tags'       : category
  30.                             ,'language'   : language
  31.                             ,'publisher'  : publisher
  32.                          }
  33.  
  34.     keep_only_tags = [  dict(name='div', attrs={'id':'in'})
  35.                      ]
  36.  
  37.  
  38.     remove_tags = [
  39.                      dict(name='div', attrs={'class':'in-more-stories'})
  40.                   ]
  41.  
  42.     remove_tags_after = [
  43.                               dict(name='div', attrs={'id':'comment_wrapper'})
  44.                             , dict(name='div', attrs={'class':'box-title4'})
  45.                         ]
  46.  
  47.     feeds = [ (u'\u0218tiri', u'http://www.azi.md/ro/feeds/0/rss201') ]
  48.  
  49.     def preprocess_html(self, soup):
  50.         return self.adeify_images(soup)
  51.