mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Fix #7150 (Updated recipe for chilean news portal El Mercurio)
This commit is contained in:
parent
6e2987ad49
commit
63dabd9789
@ -1,7 +1,5 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
|
__copyright__ = '2009-2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
'''
|
'''
|
||||||
emol.com
|
emol.com
|
||||||
'''
|
'''
|
||||||
@ -19,43 +17,34 @@ class ElMercurio(BasicNewsRecipe):
|
|||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
encoding = 'cp1252'
|
encoding = 'cp1252'
|
||||||
cover_url = 'http://www.emol.com/especiales/logo_emol/logo_emol.gif'
|
masthead_url = 'http://www.emol.com/especiales/logo_emol/logo_emol.gif'
|
||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
|
language = 'es'
|
||||||
|
|
||||||
html2lrf_options = [
|
|
||||||
'--comment', description
|
|
||||||
, '--category', category
|
|
||||||
, '--publisher', publisher
|
|
||||||
]
|
|
||||||
|
|
||||||
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"'
|
conversion_options = {
|
||||||
|
'comment' : description
|
||||||
|
, 'tags' : category
|
||||||
|
, 'publisher' : publisher
|
||||||
|
, 'language' : language
|
||||||
|
}
|
||||||
|
|
||||||
keep_only_tags = [
|
keep_only_tags = [dict(name='div', attrs={'id':['cont_iz_titulobajada','cont_iz_creditos_1_a','cont_iz_cuerpo']})]
|
||||||
dict(name='div', attrs={'class':'despliegue-txt_750px'})
|
remove_tags = [dict(name='div', attrs={'id':'cont_iz_cuerpo_relacionados'})]
|
||||||
,dict(name='div', attrs={'id':'div_cuerpo_participa'})
|
remove_attributes = ['height','width']
|
||||||
]
|
|
||||||
|
|
||||||
remove_tags = [
|
|
||||||
dict(name='div', attrs={'class':'contenedor_despliegue-col-left300'})
|
|
||||||
,dict(name='div', attrs={'id':['div_centro_dn_opc','div_cabezera','div_secciones','div_contenidos','div_pie','nav']})
|
|
||||||
]
|
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Noticias de ultima hora', u'http://www.emol.com/rss20/rss.asp?canal=0')
|
(u'Noticias de ultima hora', u'http://rss.emol.com/rss.asp?canal=0')
|
||||||
,(u'Nacional', u'http://www.emol.com/rss20/rss.asp?canal=1')
|
,(u'Nacional', u'http://rss.emol.com/rss.asp?canal=1')
|
||||||
,(u'Mundo', u'http://www.emol.com/rss20/rss.asp?canal=2')
|
,(u'Mundo', u'http://rss.emol.com/rss.asp?canal=2')
|
||||||
,(u'Deportes', u'http://www.emol.com/rss20/rss.asp?canal=4')
|
,(u'Deportes', u'http://rss.emol.com/rss.asp?canal=4')
|
||||||
,(u'Magazine', u'http://www.emol.com/rss20/rss.asp?canal=6')
|
,(u'Magazine', u'http://rss.emol.com/rss.asp?canal=6')
|
||||||
,(u'Tecnologia', u'http://www.emol.com/rss20/rss.asp?canal=5')
|
,(u'Tecnologia', u'http://rss.emol.com/rss.asp?canal=5')
|
||||||
,(u'La Musica', u'http://www.emol.com/rss20/rss.asp?canal=7')
|
|
||||||
]
|
]
|
||||||
|
|
||||||
def preprocess_html(self, soup):
|
def preprocess_html(self, soup):
|
||||||
mtag = '<meta http-equiv="Content-Language" content="es-CL"/>'
|
|
||||||
soup.head.insert(0,mtag)
|
|
||||||
for item in soup.findAll(style=True):
|
for item in soup.findAll(style=True):
|
||||||
del item['style']
|
del item['style']
|
||||||
return soup
|
return soup
|
||||||
|
|
||||||
language = 'es'
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user