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

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2008-2011, Darko Miletic <darko.miletic at gmail.com>'
  3. '''
  4. www.cronista.com
  5. '''
  6.  
  7. from calibre.web.feeds.news import BasicNewsRecipe
  8.  
  9. class Pagina12(BasicNewsRecipe):
  10.     title                 = 'El Cronista Comercial'
  11.     __author__            = 'Darko Miletic'
  12.     description           = 'El Cronista Comercial es el Diario economico-politico mas valorado. Es la fuente mas confiable de informacion en temas de economia, finanzas y negocios enmarcados politicamente.'
  13.     publisher             = 'Cronista.com'
  14.     category              = 'news, politics, economy, finances, Argentina'
  15.     oldest_article        = 2
  16.     max_articles_per_feed = 200
  17.     no_stylesheets        = True
  18.     encoding              = 'utf8'
  19.     use_embedded_content  = False
  20.     language              = 'es_AR'
  21.     remove_empty_feeds    = True
  22.     publication_type      = 'newspaper'
  23.     masthead_url          = 'http://www.cronista.com/export/sites/diarioelcronista/arte/header-logo.gif'
  24.     extra_css             = """
  25.                                body{font-family: Arial,Helvetica,sans-serif }
  26.                                h2{font-family: Georgia,"Times New Roman",Times,serif }
  27.                                img{margin-bottom: 0.4em; display:block}
  28.                                .nom{font-weight: bold; vertical-align: baseline}
  29.                                .autor-cfoto{border-bottom: 1px solid #D2D2D2;
  30.                                             border-top: 1px solid #D2D2D2;
  31.                                             display: inline-block;
  32.                                             margin: 0 10px 10px 0;
  33.                                             padding: 10px;
  34.                                             width: 210px}
  35.                                 .under{font-weight: bold}
  36.                                 .time{font-size: small}
  37.                             """
  38.  
  39.     conversion_options = {
  40.                           'comment'   : description
  41.                         , 'tags'      : category
  42.                         , 'publisher' : publisher
  43.                         , 'language'  : language
  44.                         }
  45.  
  46.     remove_tags = [
  47.                      dict(name=['meta','link','base','iframe','object','embed'])
  48.                     ,dict(attrs={'class':['user-tools','tabsmedia']})
  49.                   ]
  50.     remove_attributes  = ['lang']
  51.     remove_tags_before = dict(attrs={'class':'top'})
  52.     remove_tags_after  = dict(attrs={'class':'content-nota'})
  53.     feeds = [(u'Ultimas noticias', u'http://www.cronista.com/rss.html')]
  54.  
  55.  
  56.     def preprocess_html(self, soup):
  57.         for item in soup.findAll(style=True):
  58.             del item['style']
  59.         return soup
  60.