mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Fix #6452 (New recipes for Bolivian newspapers in Spanish)
This commit is contained in:
parent
8f0e4f5367
commit
23875dec1a
BIN
resources/images/news/la_razon_bo.png
Normal file
BIN
resources/images/news/la_razon_bo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 356 B |
BIN
resources/images/news/los_tiempos_bo.png
Normal file
BIN
resources/images/news/los_tiempos_bo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 464 B |
64
resources/recipes/la_razon_bo.recipe
Normal file
64
resources/recipes/la_razon_bo.recipe
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
|
'''
|
||||||
|
www.la-razon.com
|
||||||
|
'''
|
||||||
|
|
||||||
|
from calibre import strftime
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class LaRazon_Bol(BasicNewsRecipe):
|
||||||
|
title = 'La Razón - Bolivia'
|
||||||
|
__author__ = 'Darko Miletic'
|
||||||
|
description = 'El diario nacional de Bolivia'
|
||||||
|
publisher = 'Praxsis S.R.L.'
|
||||||
|
category = 'news, politics, Bolivia'
|
||||||
|
oldest_article = 1
|
||||||
|
max_articles_per_feed = 200
|
||||||
|
no_stylesheets = True
|
||||||
|
encoding = 'cp1252'
|
||||||
|
use_embedded_content = False
|
||||||
|
language = 'es'
|
||||||
|
publication_type = 'newspaper'
|
||||||
|
delay = 1
|
||||||
|
remove_empty_feeds = True
|
||||||
|
cover_url = strftime('http://www.la-razon.com/portadas/%Y%m%d_LaRazon.jpg')
|
||||||
|
masthead_url = 'http://www.la-razon.com/imagenes/logo.jpg'
|
||||||
|
extra_css = """ body{font-family: Arial,Helvetica,sans-serif }
|
||||||
|
img{margin-bottom: 0.4em}
|
||||||
|
.noticia-titulo{font-family: Georgia,"Times New Roman",Times,serif}
|
||||||
|
.lead{font-weight: bold; font-size: 0.8em}
|
||||||
|
"""
|
||||||
|
|
||||||
|
conversion_options = {
|
||||||
|
'comment' : description
|
||||||
|
, 'tags' : category
|
||||||
|
, 'publisher' : publisher
|
||||||
|
, 'language' : language
|
||||||
|
}
|
||||||
|
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'class':['noticia-titulo','noticia-desarrollo']})]
|
||||||
|
remove_tags = [dict(name=['meta','link','form','iframe','embed','object'])]
|
||||||
|
remove_attributes = ['width','height']
|
||||||
|
|
||||||
|
feeds = [
|
||||||
|
(u'Editorial' , u'http://www.la-razon.com/rss_editorial.php' )
|
||||||
|
,(u'Opinión' , u'http://www.la-razon.com/rss_opinion.php' )
|
||||||
|
,(u'Nacional' , u'http://www.la-razon.com/rss_nacional.php' )
|
||||||
|
,(u'Economia' , u'http://www.la-razon.com/rss_economia.php' )
|
||||||
|
,(u'Ciudades' , u'http://www.la-razon.com/rss_ciudades.php' )
|
||||||
|
,(u'Sociedad' , u'http://www.la-razon.com/rss_sociedad.php' )
|
||||||
|
,(u'Mundo' , u'http://www.la-razon.com/rss_sociedad.php' )
|
||||||
|
,(u'La Revista' , u'http://www.la-razon.com/rss_larevista.php' )
|
||||||
|
,(u'Sociales' , u'http://www.la-razon.com/rss_sociales.php' )
|
||||||
|
,(u'Mia' , u'http://www.la-razon.com/rss_mia.php' )
|
||||||
|
,(u'Marcas' , u'http://www.la-razon.com/rss_marcas.php' )
|
||||||
|
,(u'Escape' , u'http://www.la-razon.com/rss_escape.php' )
|
||||||
|
,(u'El Financiero' , u'http://www.la-razon.com/rss_financiero.php')
|
||||||
|
,(u'Tendencias' , u'http://www.la-razon.com/rss_tendencias.php')
|
||||||
|
]
|
||||||
|
|
||||||
|
def preprocess_html(self, soup):
|
||||||
|
for item in soup.findAll(style=True):
|
||||||
|
del item['style']
|
||||||
|
return soup
|
63
resources/recipes/los_tiempos_bo.recipe
Normal file
63
resources/recipes/los_tiempos_bo.recipe
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
|
'''
|
||||||
|
www.lostiempos.com
|
||||||
|
'''
|
||||||
|
|
||||||
|
from calibre import strftime
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class LosTiempos_Bol(BasicNewsRecipe):
|
||||||
|
title = 'Los Tiempos - Bolivia'
|
||||||
|
__author__ = 'Darko Miletic'
|
||||||
|
description = 'El periódico de mayor circulación en la ciudad de Cochabamba, Bolivia'
|
||||||
|
publisher = 'Los Tiempos'
|
||||||
|
category = 'news, politics, Bolivia'
|
||||||
|
oldest_article = 1
|
||||||
|
max_articles_per_feed = 200
|
||||||
|
no_stylesheets = True
|
||||||
|
encoding = 'cp1252'
|
||||||
|
use_embedded_content = False
|
||||||
|
language = 'es'
|
||||||
|
publication_type = 'newspaper'
|
||||||
|
delay = 1
|
||||||
|
remove_empty_feeds = True
|
||||||
|
cover_url = strftime('http://www.lostiempos.com/media_recortes/%Y/%m/%d/portada_md_1.jpg')
|
||||||
|
masthead_url = 'http://www.lostiempos.com/img_stat/logo_tiempos_sin_beta.jpg'
|
||||||
|
extra_css = """ body{font-family: Arial,Helvetica,sans-serif }
|
||||||
|
img{margin-bottom: 0.4em}
|
||||||
|
h1,.hora,.breadcum,.pie_foto{font-family: Georgia,"Times New Roman",Times,serif}
|
||||||
|
.hora,.breadcum,.pie_foto{font-size: small}
|
||||||
|
.en_gris,.pie_foto{color: #666666}
|
||||||
|
"""
|
||||||
|
|
||||||
|
conversion_options = {
|
||||||
|
'comment' : description
|
||||||
|
, 'tags' : category
|
||||||
|
, 'publisher' : publisher
|
||||||
|
, 'language' : language
|
||||||
|
}
|
||||||
|
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'id':'articulo'})]
|
||||||
|
remove_tags = [
|
||||||
|
dict(name=['meta','link','form','iframe','embed','object','hr'])
|
||||||
|
,dict(attrs={'class':['caja_fonts sin_border_bot','pub']})
|
||||||
|
]
|
||||||
|
remove_attributes = ['width','height']
|
||||||
|
|
||||||
|
feeds = [
|
||||||
|
(u'Nacional' , u'http://www.lostiempos.com/rss/lostiempos-nacional.xml' )
|
||||||
|
,(u'Local' , u'http://www.lostiempos.com/rss/lostiempos-local.xml' )
|
||||||
|
,(u'Deportes' , u'http://www.lostiempos.com/rss/lostiempos-deportes.xml' )
|
||||||
|
,(u'Economía' , u'http://www.lostiempos.com/rss/lostiempos-economia.xml' )
|
||||||
|
,(u'Internacional' , u'http://www.lostiempos.com/rss/lostiempos-internacional.xml' )
|
||||||
|
,(u'Vida y Futuro' , u'http://www.lostiempos.com/rss/lostiempos-vida-y-futuro.xml' )
|
||||||
|
,(u'Tragaluz' , u'http://www.lostiempos.com/rss/lostiempos-tragaluz.xml' )
|
||||||
|
,(u'Opiniones' , u'http://www.lostiempos.com/rss/lostiempos-opiniones.xml' )
|
||||||
|
]
|
||||||
|
|
||||||
|
def preprocess_html(self, soup):
|
||||||
|
for item in soup.findAll(style=True):
|
||||||
|
del item['style']
|
||||||
|
return soup
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user