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

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
  3. '''
  4. www.vatican.va/news_services/or/or_quo
  5. '''
  6.  
  7.  
  8. from calibre.web.feeds.news import BasicNewsRecipe
  9.  
  10. class LOsservatoreRomano_it(BasicNewsRecipe):
  11.     title                = "L'Osservatore Romano"
  12.     __author__           = 'Darko Miletic'
  13.     description          = 'Quiornale quotidiano, politico, religioso del Vaticano'
  14.     publisher            = 'La Santa Sede'
  15.     category             = 'news, politics, religion, Vatican'
  16.     no_stylesheets       = True
  17.     INDEX                = 'http://www.vatican.va'
  18.     FEEDPAGE             = INDEX + '/news_services/or/or_quo/index.html'
  19.     CONTENTPAGE          = INDEX + '/news_services/or/or_quo/text.html'
  20.     use_embedded_content = False
  21.     encoding             = 'cp1252'
  22.     language             = 'it'
  23.     publication_type     = 'newspaper'
  24.  
  25.  
  26.     conversion_options = {
  27.                           'comment'          : description
  28.                         , 'tags'             : category
  29.                         , 'publisher'        : publisher
  30.                         , 'language'         : language
  31.                         , 'linearize_tables' : True
  32.                         }
  33.  
  34.     def parse_index(self):
  35.         articles = []
  36.         articles.append({
  37.                           'title'      :self.title
  38.                          ,'date'       :''
  39.                          ,'url'        :self.CONTENTPAGE
  40.                          ,'description':''
  41.                         })
  42.         return [(self.title, articles)]
  43.  
  44.     def preprocess_html(self, soup):
  45.         for item in soup.findAll(style=True):
  46.             del item['style']
  47.         return self.adeify_images(soup)
  48.  
  49.