4
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
4
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
10
10
from calibre.web.feeds.news import BasicNewsRecipe
12
class LaNacionChile(BasicNewsRecipe):
13
title = 'La Nacion Chile'
14
__author__ = 'Darko Miletic'
15
description = 'El sitio de noticias online de Chile'
16
publisher = 'La Nacion'
17
category = 'news, politics, Chile'
19
max_articles_per_feed = 100
21
use_embedded_content = False
23
cover_url = 'http://www.lanacion.cl/prontus_noticias_v2/imag/site/logo.gif'
24
remove_javascript = True
12
class LaNacionChile(BasicNewsRecipe):
13
title = 'La Nacion Chile'
14
__author__ = 'Darko Miletic'
15
description = 'El sitio de noticias online de Chile'
16
publisher = 'La Nacion'
17
category = 'news, politics, Chile'
19
max_articles_per_feed = 100
21
use_embedded_content = False
23
cover_url = 'http://www.lanacion.cl/prontus_noticias_v2/imag/site/logo.gif'
24
remove_javascript = True
27
27
'--comment', description
28
, '--category', category
29
, '--publisher', publisher
32
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"'
34
keep_only_tags = [dict(name='div', attrs={'class':'bloque'})]
36
feeds = [(u'Noticias', u'http://www.lanacion.cl/rss.xml')]
38
def print_version(self, url):
39
toprint = urllib.quote(url,':/')
40
return u'http://www.lanacion.cl/cgi-bx/imprimir.cgi?_URL=' + toprint
42
def preprocess_html(self, soup):
43
del soup.body['onload']
44
soup.head.base.extract()
45
item = soup.find('a', attrs={'href':'javascript:window.close()'})
48
mtag = '<meta http-equiv="Content-Language" content="es-CL"/>'
49
soup.head.insert(0,mtag)
50
for item in soup.findAll(style=True):
54
language = _('Spanish')
b'\\ No newline at end of file'
28
, '--category', category
29
, '--publisher', publisher
32
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"'
34
keep_only_tags = [dict(name='div', attrs={'class':'bloque'})]
36
feeds = [(u'Noticias', u'http://www.lanacion.cl/rss.xml')]
38
def print_version(self, url):
39
toprint = urllib.quote(url,':/')
40
return u'http://www.lanacion.cl/cgi-bx/imprimir.cgi?_URL=' + toprint
42
def preprocess_html(self, soup):
43
del soup.body['onload']
44
soup.head.base.extract()
45
item = soup.find('a', attrs={'href':'javascript:window.close()'})
48
mtag = '<meta http-equiv="Content-Language" content="es-CL"/>'
49
soup.head.insert(0,mtag)
50
for item in soup.findAll(style=True):