View Single Post
Old 08-13-2011, 10:07 AM   #1
yoyoba
Junior Member
yoyoba began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2011
Device: amazon kindle
New recipe in spanish - Muy Interesante

__license__ = 'GPL v3'
__copyright__ = '2011, Oscar Megia Lopez'
'''
muyinteresante.es
'''
import re
from calibre.web.feeds.recipes import BasicNewsRecipe

class MuyInteresante2(BasicNewsRecipe):
title = u'Muy Interesante'
__author__ = 'Oscar Megia Lopez'
description = 'Revista Muy Interesante'
oldest_article = 90
max_articles_per_feed = 100
no_stylesheets = True
#delay = 1
use_embedded_content = False
encoding = 'utf8'
publisher = 'Muy Interesante'
category = 'Ciencia'
language = 'es_ES'
publication_type = 'Magazine'
extra_css = ' body{ font-family: Verdana,Helvetica,Arial,sans-serif } .contentheading{font-weight: bold} .txt_articulo{display: block; padding: 0; border: 1px solid; width: 40%; font-size: small} .story-feature h2{text-align: center; text-transform: uppercase} '
preprocess_regexps = [(re.compile(r'<!--.*?-->', re.DOTALL), lambda m: '')]
conversion_options = {
'comments' : description
,'tags' : category
,'language' : language
,'publisher' : publisher
,'linearize_tables': True
}

keep_only_tags = [
dict(name='div', attrs={'class':['article']})
,dict(attrs={'class':['txt_articulo']})
]

remove_tags = [
dict(name='div', attrs={'class':['otrosenlaces_title', 'otrosenlaces_parent', 'otrosenlaces', \
'tags_articles', 'story-feature narrow', 'bajo_title']}),
dict(name='a', attrs={'class':['twitter-share-button']}),
dict(name='div', attrs={'id':['comment']})
]


remove_attributes = ['width','height']

feeds = [
('Muy Interesante.es', 'http://feeds.feedburner.com/Muyinteresantees?format=xml'),
]
yoyoba is offline   Reply With Quote