4
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
9
from calibre.web.feeds.news import BasicNewsRecipe
10
from calibre.ebooks.BeautifulSoup import BeautifulSoup, Tag
12
class LaPrensaHn(BasicNewsRecipe):
13
title = 'La Prensa - Honduras'
14
__author__ = 'Darko Miletic'
15
description = 'Noticias de Honduras y mundo'
16
publisher = 'La Prensa'
17
category = 'news, politics, Honduras'
19
max_articles_per_feed = 100
20
use_embedded_content = False
22
remove_javascript = True
24
language = _('Spanish')
29
'--comment', description
30
, '--category', category
31
, '--publisher', publisher
34
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"\npretty_print=True\noverride_css=" p {text-indent: 0cm; margin-top: 0em; margin-bottom: 0.5em} "'
36
remove_tags = [dict(name=['form','object','embed'])]
39
dict(name='h1' , attrs={'class':'titulo1'})
40
,dict(name='div', attrs={'class':['sumario11','hora','texto']})
43
feeds = [(u'Noticias', u'http://feeds.feedburner.com/laprensa_titulares')]
45
def preprocess_html(self, soup):
46
soup.html['lang'] = self.lang
47
soup.html['dir' ] = self.direction
48
mlang = Tag(soup,'meta',[("http-equiv","Content-Language"),("content",self.lang)])
49
mcharset = Tag(soup,'meta',[("http-equiv","Content-Type"),("content","text/html; charset=utf-8")])
50
soup.head.insert(0,mlang)
51
soup.head.insert(1,mcharset)
52
for item in soup.findAll(style=True):