mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
59 lines
3.3 KiB
Plaintext
59 lines
3.3 KiB
Plaintext
__license__ = 'GPL v3'
|
|
__copyright__ = '2008-2010, Darko Miletic <darko.miletic at gmail.com>'
|
|
'''
|
|
lanacion.com.ar
|
|
'''
|
|
|
|
from calibre.web.feeds.news import BasicNewsRecipe
|
|
|
|
class Lanacion(BasicNewsRecipe):
|
|
title = 'La Nacion'
|
|
__author__ = 'Darko Miletic'
|
|
description = 'Noticias de Argentina y el resto del mundo'
|
|
publisher = 'La Nacion S.A.'
|
|
category = 'news, politics, Argentina'
|
|
oldest_article = 2
|
|
max_articles_per_feed = 100
|
|
use_embedded_content = False
|
|
no_stylesheets = True
|
|
language = 'es'
|
|
encoding = 'cp1252'
|
|
masthead_url = 'http://www.lanacion.com.ar/imgs/layout/logos/ln341x47.gif'
|
|
extra_css = ' h1{font-family: Georgia,serif} body{font-family: Arial,sans-serif} img{margin-top: 0.5em; margin-bottom: 0.2em} .notaEpigrafe{font-size: x-small} '
|
|
|
|
|
|
conversion_options = {
|
|
'comment' : description
|
|
, 'tags' : category
|
|
, 'publisher': publisher
|
|
, 'language' : language
|
|
}
|
|
|
|
keep_only_tags = [dict(name='div', attrs={'class':'nota floatFix'})]
|
|
remove_tags = [
|
|
dict(name='div' , attrs={'class':'notaComentario floatFix noprint' })
|
|
,dict(name='ul' , attrs={'class':'cajaHerramientas cajaTop noprint'})
|
|
,dict(name='div' , attrs={'class':'cajaHerramientas noprint' })
|
|
,dict(attrs={'class':['titulosMultimedia','derecha','techo color']})
|
|
,dict(name=['iframe','embed','object'])
|
|
]
|
|
remove_attributes = ['height','width']
|
|
|
|
feeds = [
|
|
(u'Ultimas noticias' , u'http://www.lanacion.com.ar/herramientas/rss/index.asp?origen=2' )
|
|
,(u'Diario de hoy' , u'http://www.lanacion.com.ar/herramientas/rss/index.asp?origen=1' )
|
|
,(u'Politica' , u'http://www.lanacion.com.ar/herramientas/rss/index.asp?categoria_id=30' )
|
|
,(u'Economia' , u'http://www.lanacion.com.ar/herramientas/rss/index.asp?categoria_id=272' )
|
|
,(u'Deportes' , u'http://www.lanacion.com.ar/herramientas/rss/index.asp?categoria_id=131' )
|
|
,(u'Informacion General' , u'http://www.lanacion.com.ar/herramientas/rss/index.asp?categoria_id=21' )
|
|
,(u'Cultura' , u'http://www.lanacion.com.ar/herramientas/rss/index.asp?categoria_id=1' )
|
|
,(u'Opinion' , u'http://www.lanacion.com.ar/herramientas/rss/index.asp?categoria_id=28' )
|
|
,(u'Espectaculos' , u'http://www.lanacion.com.ar/herramientas/rss/index.asp?categoria_id=120' )
|
|
,(u'Exterior' , u'http://www.lanacion.com.ar/herramientas/rss/index.asp?categoria_id=7' )
|
|
,(u'Ciencia/Salud' , u'http://www.lanacion.com.ar/herramientas/rss/index.asp?categoria_id=498' )
|
|
,(u'Revista' , u'http://www.lanacion.com.ar/herramientas/rss/index.asp?categoria_id=494' )
|
|
]
|
|
|
|
def preprocess_html(self, soup):
|
|
return self.adeify_images(soup)
|