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

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2010-2011, 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.     remove_empty_feeds     = True    
  19.     encoding               = 'cp1252'
  20.     publisher              = 'El Universal'
  21.     category               = 'news, Caracas, Venezuela, world'
  22.     language               = 'es_VE'
  23.     publication_type       = 'newspaper'    
  24.     cover_url              = strftime('http://static.eluniversal.com/%Y/%m/%d/portada.jpg')
  25.     extra_css              = """
  26.                                 .txt60{font-family: Tahoma,Geneva,sans-serif; font-size: small}
  27.                                 .txt29{font-family: Tahoma,Geneva,sans-serif; font-size: small; color: gray}
  28.                                 .txt38{font-family: Georgia,"Times New Roman",Times,serif; font-size: xx-large}
  29.                                 .txt35{font-family: Georgia,"Times New Roman",Times,serif; font-size: large}
  30.                                 body{font-family: Verdana,Arial,Helvetica,sans-serif}
  31.                              """
  32.     conversion_options = {
  33.                              'comments'        : description
  34.                             ,'tags'            : category
  35.                             ,'language'        : language
  36.                             ,'publisher'       : publisher
  37.                          }
  38.  
  39.     remove_tags_before=dict(attrs={'class':'header-print MB10'})
  40.     remove_tags_after= dict(attrs={'id':'SizeText'})
  41.     remove_tags      = [
  42.                           dict(name=['object','link','script','iframe','meta'])
  43.                          ,dict(attrs={'class':'header-print MB10'})
  44.                        ]
  45.  
  46.     feeds = [
  47.                (u'Ultimas Noticias', u'http://www.eluniversal.com/rss/avances.xml'    )
  48.               ,(u'Economia'        , u'http://www.eluniversal.com/rss/eco_avances.xml')
  49.               ,(u'Internacionales' , u'http://www.eluniversal.com/rss/int_avances.xml')
  50.               ,(u'Deportes'        , u'http://www.eluniversal.com/rss/dep_avances.xml')
  51.               ,(u'Cultura'         , u'http://www.eluniversal.com/rss/cul_avances.xml')
  52.               ,(u'Nacional y politica' , u'http://www.eluniversal.com/rss/pol_avances.xml')
  53.               ,(u'Ciencia y tecnologia', u'http://www.eluniversal.com/rss/cyt_avances.xml')
  54.               ,(u'Universo empresarial', u'http://www.eluniversal.com/rss/uni_avances.xml')
  55.               ,(u'Caracas'        , u'http://www.eluniversal.com/rss/ccs_avances.xml')
  56.             ]
  57.  
  58.     def print_version(self, url):
  59.         rp,sep,rest = url.rpartition('/')
  60.         return rp + sep + 'imp_' + rest
  61.  
  62.