home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Narzedzia / Calibre / calibre-0.8.18.msi / file_280 / newsmoldova.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. newsmoldova.md
  8. '''
  9.  
  10. from calibre.web.feeds.news import BasicNewsRecipe
  11.  
  12. class NewsMoldova(BasicNewsRecipe):
  13.     title                 = u'Agen\u0163ia de \u015ftiri Moldova'
  14.     language              = 'ro'
  15.     __author__            = u'Silviu Cotoar\u0103'
  16.     description           = u'Agen\u0163ia de \u015ftiri Moldova'
  17.     publisher             = 'Moldova'
  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.newsmoldova.md/i/logo_top_md.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={'class':'main-article-index article'})
  35.                      ]
  36.  
  37.  
  38.     remove_tags = [
  39.                       dict(name='div', attrs={'id':'actions'})
  40.                      , dict(name='li', attrs={'class':'invisible'})
  41.                   ]
  42.  
  43.     remove_tags_after = [
  44.                              dict(name='div', attrs={'id':'actions'})
  45.                         ]
  46.  
  47.     feeds = [ (u'\u0218tiri', u'http://newsmoldova.md/export/rss2/archive/index.xml') ]
  48.  
  49.     def preprocess_html(self, soup):
  50.         return self.adeify_images(soup)
  51.