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

  1. #!/usr/bin/env  python
  2. __license__    = 'GPL v3'
  3. __author__     = 'Lorenzo Vigentini'
  4. __copyright__   = '2009, Lorenzo Vigentini <l.vigentini at gmail.com>'
  5. __description__ = 'Daily newspaper from Spain'
  6. __version__     = 'v1.01'
  7. __date__        = '14, January 2010'
  8.  
  9. '''
  10. http://www.nortecastilla.es/
  11. '''
  12.  
  13. from calibre.web.feeds.news import BasicNewsRecipe
  14.  
  15. class norteCastilla(BasicNewsRecipe):
  16.     author        = 'Lorenzo Vigentini'
  17.     description   = 'Daily newspaper from Spain'
  18.  
  19.     cover_url      = 'http://www.nortecastilla.es/img/rd.logo_nortecastilla.png'
  20.     title          = u'NorteCastilla '
  21.     publisher      = 'Vocento'
  22.     category       = 'News, politics, culture, economy, general interest'
  23.  
  24.     language       = 'es'
  25.     timefmt        = '[%a, %d %b, %Y]'
  26.  
  27.     oldest_article = 1
  28.     max_articles_per_feed = 25
  29.  
  30.     use_embedded_content  = False
  31.     recursion             = 10
  32.  
  33.     remove_javascript = True
  34.     no_stylesheets = True
  35.  
  36.     keep_only_tags = [
  37.                         dict(name='div', attrs={'class':['articulo','photo']})
  38.                     ]
  39.  
  40.     remove_tags    = [
  41.                         dict(name='div', attrs={'class':['contenido_form_articulo','colC_articulo','publiEspecial']}),
  42.                         dict(name='div', attrs={'class':['tags_relacionados','form_art form_opina','adds','comentarios']}),
  43.                         dict(name='span', attrs={'class':'contenido_form_articulo'}),
  44.                         dict(name='div', attrs={'id':'publi1_noxtrum'}),
  45.                         dict(name='a', attrs={'class':['nav_fgH_ant','nav_fgH_sig']})
  46.                     ]
  47.  
  48.     feeds          = [
  49.                         (u'Ultima hora', u'http://www.nortecastilla.es/rss/feeds/ultima.xml'),
  50.                         (u'Portada', u'http://www.nortecastilla.es/portada.xml'),
  51.                         (u'Espana', u'http://www.nortecastilla.es/img/rss_descarga.gif'),
  52.                         (u'Mundo', u'http://www.nortecastilla.es/rss/feeds/mundo.xml'),
  53.                         (u'Economia', u'http://www.nortecastilla.es/rss/feeds/economia.xml'),
  54.                         (u'Deportes', u'http://www.nortecastilla.es/rss/feeds/deportes.xml'),
  55.                         (u'Vida y ocio', u'http://www.nortecastilla.es/rss/feeds/ocio.xml'),
  56.                         (u'Cultura', u'http://www.nortecastilla.es/rss/feeds/cultura.xml'),
  57.                         (u'Television', u'http://www.nortecastilla.es/rss/feeds/television.xml'),
  58.                         (u'Contraportada', u'http://www.nortecastilla.es/rss/feeds/contraportada.xml')
  59.                     ]
  60.  
  61.  
  62.     extra_css = '''
  63.                     .articulo{clear:both; padding:0 2px 0 6px}
  64.                     .art_head{clear:both;}
  65.                     .articulo .overhead{ color:#C00; font-size:10px; text-transform:uppercase;}
  66.                     .articulo .headline{ color:#036; font-size:36px; font-weight:normal;}
  67.                     .articulo .headline a,.articulo .headline a:hover{ color:#036; cursor:default; text-decoration:none;}
  68.                     .articulo .subhead{ color:#686868; font-size:16px; font-weight:normal; margin:0 0 5px 0}
  69.                     .articulo .date,.articulo .byline,.articulo .author,.articulo .name,.articulo .description{ display:inline; font-size:11px; color:#8E8E8E; font-weight:bold;}
  70.                     .articulo .byline a{ color:#8E8E8E;}
  71.                     .articulo .barhead{ font-size:14px;font-weight:normal; padding:0 0 15px 0}
  72.                     .articulo .text{ font-size:14px;font-weight:normal;}
  73.                     .articulo .text .p{ line-height:18px; padding:0 0 15px 0}
  74.                     .articulo .text .p a{ text-decoration:underline; color:#036}
  75.                     .articulo .text .p a:hover{ text-decoration:none; color:#cc0000}
  76.                     .articulo .pbox{text-align:left; margin:0 auto 0 10px; text-align:left;}
  77.                     .articulo .photo-alt1,.colC_articulo .photo{text-align:center; margin:0 auto; background-color:#F2F2F2;}
  78.                     .articulo .photo-alt1 img,.colC_articulo .photo img{text-align:center; margin:0 auto;}
  79.                     .articulo .photo-caption{ position:relative; z-index:5; display:block; background-color:#F2F2F2; font-size:11px; color:#666; padding:2px 5px; text-align:left;}
  80.                     .articulo .photo-caption a{ color:#666;}
  81.                     .fotogaleriasH .photo {background-color:#DCDCDC;margin:0 auto;padding:5px 0 0;text-align:center;}
  82.                     .fotogaleriasH .photo img {display: block; margin:0 auto;text-align:center;}
  83.                 '''
  84.