diff --git a/resources/images/news/eluniverso_ec.png b/resources/images/news/eluniverso_ec.png new file mode 100644 index 0000000000..c5a8918bcd Binary files /dev/null and b/resources/images/news/eluniverso_ec.png differ diff --git a/resources/recipes/eluniverso_ec.recipe b/resources/recipes/eluniverso_ec.recipe new file mode 100644 index 0000000000..a0e8b46474 --- /dev/null +++ b/resources/recipes/eluniverso_ec.recipe @@ -0,0 +1,63 @@ +__license__ = 'GPL v3' +__copyright__ = '2010, Darko Miletic ' +''' +eluniverso.com +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class ElUniverso_Ecuador(BasicNewsRecipe): + title = 'El Universo - Ecuador' + __author__ = 'Darko Miletic' + description = 'Noticias del Ecuador y el resto del mundo' + publisher = 'El Universo' + category = 'news, politics, Ecuador' + oldest_article = 2 + max_articles_per_feed = 200 + no_stylesheets = True + encoding = 'utf8' + use_embedded_content = False + language = 'es' + remove_empty_feeds = True + publication_type = 'newspaper' + masthead_url = 'http://servicios2.eluniverso.com/versiones/v1/img/Hd/lg_ElUniverso.gif' + extra_css = """ + body{font-family: Verdana,Arial,Helvetica,sans-serif; color: #333333 } + h2{font-family: Georgia,"Times New Roman",Times,serif; color: #1B2D60} + """ + + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher' : publisher + , 'language' : language + } + + remove_tags = [ + dict(attrs={'class':['flechs','multiBox','colRecursos']}) + ,dict(name=['meta','link','embed','object','iframe','base']) + ] + keep_only_tags = [dict(attrs={'class':'Nota'})] + remove_tags_after = dict(attrs={'id':'TextoPrint'}) + remove_tags_before = dict(attrs={'id':'FechaPrint'}) + + feeds = [ + (u'Portada' , u'http://www.eluniverso.com/rss/portada.xml' ) + ,(u'Politica' , u'http://www.eluniverso.com/rss/politica.xml' ) + ,(u'Economia' , u'http://www.eluniverso.com/rss/economia.xml' ) + ,(u'Sucesos' , u'http://www.eluniverso.com/rss/sucesos.xml' ) + ,(u'Migracion' , u'http://www.eluniverso.com/rss/migrantes_tema.xml' ) + ,(u'El Pais' , u'http://www.eluniverso.com/rss/elpais.xml' ) + ,(u'Internacionales' , u'http://www.eluniverso.com/rss/internacionales.xml' ) + ,(u'Deportes' , u'http://www.eluniverso.com/rss/deportes.xml' ) + ,(u'Gran Guayaquill' , u'http://www.eluniverso.com/rss/gran_guayaquil.xml' ) + ,(u'Entretenimiento' , u'http://www.eluniverso.com/rss/arteyespectaculos.xml' ) + ,(u'Vida' , u'http://www.eluniverso.com/rss/tuvida.xml' ) + ,(u'Opinion' , u'http://www.eluniverso.com/rss/opinion.xml' ) + ] + + def preprocess_html(self, soup): + for item in soup.findAll(style=True): + del item['style'] + return soup +