home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_3734 < prev    next >
Encoding:
Text File  |  2010-01-13  |  2.2 KB  |  53 lines

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
  3. '''
  4. www.eluniversal.com
  5. '''
  6.  
  7. from calibre import strftime
  8. from calibre.web.feeds.recipes import BasicNewsRecipe
  9.  
  10. class ElUniversal(BasicNewsRecipe):
  11.     title                  = 'El Universal'
  12.     __author__             = 'Darko Miletic'
  13.     description            = 'Noticias de Venezuela'
  14.     oldest_article         = 2
  15.     max_articles_per_feed  = 100
  16.     no_stylesheets         = True
  17.     use_embedded_content   = False
  18.     encoding               = 'cp1252'
  19.     publisher              = 'El Universal'
  20.     category               = 'news, Caracas, Venezuela, world'
  21.     language               = 'es'
  22.     cover_url              = strftime('http://static.eluniversal.com/%Y/%m/%d/portada.jpg')
  23.  
  24.     conversion_options = {
  25.                              'comments'        : description
  26.                             ,'tags'            : category
  27.                             ,'language'        : language
  28.                             ,'publisher'       : publisher
  29.                          }
  30.  
  31.     keep_only_tags   = [dict(name='div', attrs={'class':'Nota'})]
  32.     remove_tags      = [
  33.                           dict(name=['object','link','script','iframe'])
  34.                          ,dict(name='div',attrs={'class':'Herramientas'})
  35.                        ]
  36.  
  37.     feeds = [
  38.                (u'Ultimas Noticias', u'http://www.eluniversal.com/rss/avances.xml'    )
  39.               ,(u'Economia'        , u'http://www.eluniversal.com/rss/eco_avances.xml')
  40.               ,(u'Internacionales' , u'http://www.eluniversal.com/rss/int_avances.xml')
  41.               ,(u'Deportes'        , u'http://www.eluniversal.com/rss/dep_avances.xml')
  42.               ,(u'Cultura'         , u'http://www.eluniversal.com/rss/cul_avances.xml')
  43.               ,(u'Nacional y politica' , u'http://www.eluniversal.com/rss/pol_avances.xml')
  44.               ,(u'Ciencia y tecnologia', u'http://www.eluniversal.com/rss/cyt_avances.xml')
  45.               ,(u'Universo empresarial', u'http://www.eluniversal.com/rss/uni_avances.xml')
  46.               ,(u'Caracas'        , u'http://www.eluniversal.com/rss/ccs_avances.xml')
  47.             ]
  48.  
  49.     def print_version(self, url):
  50.         rp,sep,rest = url.rpartition('/')
  51.         return rp + sep + 'imp_' + rest
  52.  
  53.