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

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2009-2010, Darko Miletic <darko.miletic at gmail.com>'
  3. '''
  4. lasegunda.com
  5. '''
  6.  
  7. from calibre.web.feeds.news import BasicNewsRecipe
  8.  
  9. class LaSegunda(BasicNewsRecipe):
  10.     title                 = 'La Segunda'
  11.     __author__            = 'Darko Miletic'
  12.     description           = 'El sitio de noticias online de Chile'
  13.     publisher             = 'La Segunda'
  14.     category              = 'news, politics, Chile'
  15.     oldest_article        = 2
  16.     max_articles_per_feed = 100
  17.     no_stylesheets        = True
  18.     use_embedded_content  = False
  19.     encoding              = 'cp1252'
  20.     masthead_url          = 'http://www.lasegunda.com/imagenes/logotipo_lasegunda_Oli.gif'
  21.     remove_empty_feeds    = True
  22.     language              = 'es_CL'
  23.     extra_css             = ' .titulonegritastop{font-size: xx-large; font-weight: bold} '
  24.  
  25.     conversion_options = {
  26.                           'comment'          : description
  27.                         , 'tags'             : category
  28.                         , 'publisher'        : publisher
  29.                         , 'language'         : language
  30.                         , 'linearize_tables' : True
  31.                         }
  32.  
  33.     remove_tags_before = dict(attrs={'class':'titulonegritastop'})
  34.     remove_tags        = [dict(name='img')]
  35.     remove_attributes  = ['width','height']
  36.  
  37.  
  38.     feeds = [
  39.                (u'Noticias de ultima hora', u'http://www.lasegunda.com/rss20/index.asp?canal=0')
  40.               ,(u'Politica'               , u'http://www.lasegunda.com/rss20/index.asp?canal=21')
  41.               ,(u'Cronica'                , u'http://www.lasegunda.com/rss20/index.asp?canal=20')
  42.               ,(u'Internacional'          , u'http://www.lasegunda.com/rss20/index.asp?canal=23')
  43.               ,(u'Deportes'               , u'http://www.lasegunda.com/rss20/index.asp?canal=24')
  44.               ,(u'Epectaculos/Cultura'    , u'http://www.lasegunda.com/rss20/index.asp?canal=25')
  45.               ,(u'Educacion'              , u'http://www.lasegunda.com/rss20/index.asp?canal=26')
  46.               ,(u'Ciencia y Tecnologia'   , u'http://www.lasegunda.com/rss20/index.asp?canal=27')
  47.               ,(u'Solidaridad'            , u'http://www.lasegunda.com/rss20/index.asp?canal=28')
  48.               ,(u'Buena Vida'             , u'http://www.lasegunda.com/rss20/index.asp?canal=32')
  49.             ]
  50.  
  51.     def print_version(self, url):
  52.         rest, sep, article_id = url.partition('index.asp?idnoticia=')
  53.         return u'http://www.lasegunda.com/edicionOnline/include/secciones/_detalle_impresion.asp?idnoticia=' + article_id
  54.  
  55.