2
# -*- coding: utf-8 -*-
5
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
10
from calibre.web.feeds.news import BasicNewsRecipe
11
from calibre.ebooks.BeautifulSoup import Tag
13
class ElPeriodico_esp(BasicNewsRecipe):
14
title = 'El Periodico de Catalunya'
15
__author__ = 'Darko Miletic'
16
description = 'Noticias desde Catalunya'
17
publisher = 'elperiodico.com'
18
category = 'news, politics, Spain, Catalunya'
20
max_articles_per_feed = 100
22
use_embedded_content = False
25
language = _('Spanish')
28
'--comment' , description
29
, '--category' , category
30
, '--publisher', publisher
33
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"'
35
feeds = [(u"Toda la edición", u'http://www.elperiodico.com/rss.asp?id=46')]
38
keep_only_tags = [dict(name='div', attrs={'id':'noticia'})]
41
dict(name=['object','link','script'])
42
,dict(name='ul',attrs={'class':'herramientasDeNoticia'})
43
,dict(name='div', attrs={'id':'inferiores'})
46
def print_version(self, url):
47
return url.replace('/default.asp?','/print.asp?')
49
def preprocess_html(self, soup):
50
mcharset = Tag(soup,'meta',[("http-equiv","Content-Type"),("content","text/html; charset=utf-8")])
51
soup.head.insert(0,mcharset)
52
for item in soup.findAll(style=True):