home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_3726 < prev    next >
Encoding:
Text File  |  2009-12-16  |  2.2 KB  |  52 lines

  1.  
  2. __license__   = 'GPL v3'
  3. __copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
  4. '''
  5. elmundo.es
  6. '''
  7.  
  8. from calibre.web.feeds.news import BasicNewsRecipe
  9.  
  10. class ElMundo(BasicNewsRecipe):
  11.     title                 = 'El Mundo'
  12.     __author__            = 'Darko Miletic'
  13.     description           = 'News from Spain'
  14.     publisher             = 'El Mundo'
  15.     category              = 'news, politics, Spain'
  16.     oldest_article        = 2
  17.     max_articles_per_feed = 100
  18.     no_stylesheets        = True
  19.     use_embedded_content  = False
  20.     encoding              = 'iso8859_15'
  21.     language              = 'es'
  22.  
  23.     conversion_options = {
  24.                              'comments'  : description
  25.                             ,'tags'      : category
  26.                             ,'language'  : language
  27.                             ,'publisher' : publisher
  28.                          }
  29.  
  30.     keep_only_tags     = [dict(name='div', attrs={'class':'noticia'})]
  31.     remove_tags_before = dict(attrs={'class':['titular','antetitulo']     })
  32.     remove_tags_after  = dict(name='div' , attrs={'id':['desarrollo_noticia','tamano']})
  33.  
  34.     remove_tags = [
  35.                      dict(name='div', attrs={'class':['herramientas','publicidad_google']})
  36.                     ,dict(name='div', attrs={'id':'modulo_multimedia' })
  37.                     ,dict(name='ul', attrs={'class':'herramientas' })
  38.                     ,dict(name=['object','link'])
  39.                   ]
  40.  
  41.     feeds = [
  42.               (u'Portada'         , u'http://rss.elmundo.es/rss/descarga.htm?data2=4' )
  43.              ,(u'Deportes'        , u'http://rss.elmundo.es/rss/descarga.htm?data2=14')
  44.              ,(u'Economia'        , u'http://rss.elmundo.es/rss/descarga.htm?data2=7' )
  45.              ,(u'Espana'          , u'http://rss.elmundo.es/rss/descarga.htm?data2=8' )
  46.              ,(u'Internacional'   , u'http://rss.elmundo.es/rss/descarga.htm?data2=9' )
  47.              ,(u'Cultura'         , u'http://rss.elmundo.es/rss/descarga.htm?data2=6' )
  48.              ,(u'Ciencia/Ecologia', u'http://rss.elmundo.es/rss/descarga.htm?data2=5' )
  49.              ,(u'Comunicacion'    , u'http://rss.elmundo.es/rss/descarga.htm?data2=26')
  50.              ,(u'Television'      , u'http://rss.elmundo.es/rss/descarga.htm?data2=76')
  51.             ]
  52.