From 0772f7d62bfeb30ce42268cc6c416bd69ebb433e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 29 Sep 2011 21:19:10 -0600 Subject: [PATCH] Various Colombian news sources by BIGO-CAVA --- recipes/diario_la_republica.recipe | 11 ++++++ recipes/el_colombiano.recipe | 4 +-- recipes/el_espectador.recipe | 54 ++++++++++++++++++++++++++++++ recipes/el_mundo_co.recipe | 50 +++++++++++++++++++++++++++ recipes/el_tiempo.recipe | 9 +++-- recipes/portafolio.recipe | 4 +-- recipes/revista_semana.recipe | 11 ++++++ 7 files changed, 133 insertions(+), 10 deletions(-) create mode 100644 recipes/diario_la_republica.recipe create mode 100644 recipes/el_espectador.recipe create mode 100644 recipes/el_mundo_co.recipe create mode 100644 recipes/revista_semana.recipe diff --git a/recipes/diario_la_republica.recipe b/recipes/diario_la_republica.recipe new file mode 100644 index 0000000000..1f0e0d565b --- /dev/null +++ b/recipes/diario_la_republica.recipe @@ -0,0 +1,11 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class AdvancedUserRecipe1317341449(BasicNewsRecipe): + title = u'Diario La Republica' + __author__ = 'CAVALENCIA' + oldest_article = 7 + max_articles_per_feed = 100 + auto_cleanup = True + language = 'es_CO' + + feeds = [(u'Diario La Republica', u'http://www.larepublica.com.co/rss/larepublica.xml')] diff --git a/recipes/el_colombiano.recipe b/recipes/el_colombiano.recipe index 492229dc4f..7a413529bb 100644 --- a/recipes/el_colombiano.recipe +++ b/recipes/el_colombiano.recipe @@ -2,12 +2,10 @@ from calibre.web.feeds.news import BasicNewsRecipe - - class AdvancedUserRecipe1311790237(BasicNewsRecipe): title = u'Periódico El Colombiano' - language = 'es_CO' __author__ = 'BIGO-CAVA' + language = 'es_CO' cover_url = 'http://www.elcolombiano.com/images/logoElColombiano348x46.gif' remove_tags_before = dict(id='contenidoArt') remove_tags_after = dict(id='enviaTips') diff --git a/recipes/el_espectador.recipe b/recipes/el_espectador.recipe new file mode 100644 index 0000000000..b7187cbdf3 --- /dev/null +++ b/recipes/el_espectador.recipe @@ -0,0 +1,54 @@ +# coding=utf-8 + +from calibre.web.feeds.news import BasicNewsRecipe + +class ColombiaElEspectador(BasicNewsRecipe): + title = u'Periódico el Espectador' + __author__ = 'BIGO-CAVA' + cover_url = 'http://www.elespectador.com/sites/elespectador.com/themes/elespectador/images/logo.gif' + #remove_tags_before = dict(id='fb-root') + remove_tags_before = dict(id='content') + remove_tags_after = [dict(name='div', attrs={'class':'paginacion'})] + language = 'es_CO' + #keep_only_tags = [dict(name='div', id='content')] + remove_tags = [dict(name='div', attrs={'class':'herramientas_nota'}), + dict(name='div', attrs={'class':'relpauta'}), + dict(name='div', attrs={'class':'recursosrelacionados'}), + dict(name='div', attrs={'class':'nav_negocios'})] + # dict(name='div', attrs={'class':'tags_playerrecurso'}), + # dict(name='div', attrs={'class':'ico-mail2'}), + # dict(name='div', attrs={'id':'caja-instapaper'}), + # dict(name='div', attrs={'class':'modulo herramientas'})] + oldest_article = 2 + max_articles_per_feed = 100 + remove_javascript = True + no_stylesheets = True + use_embedded_content = False + remove_empty_feeds = True + masthead_url = 'http://www.elespectador.com/sites/elespectador.com/themes/elespectador/images/logo.gif' + publication_type = 'newspaper' + + extra_css = """ + p{text-align: justify; font-size: 100%} + body{ text-align: left; font-size:100% } + h1{font-family: sans-serif; font-size:150%; font-weight:bold; text-align: justify; } + h3{font-family: sans-serif; font-size:100%; font-style: italic; text-align: justify; } + """ + + + feeds = [(u'Política ', u' http://www.elespectador.com/noticias/politica/feed'), + (u'Judicial', u'http://www.elespectador.com/noticias/judicial/feed'), + (u'Paz', u'http://www.elespectador.com/noticias/paz/feed'), + (u'Economía', u'http://www.elespectador.com/economia/feed'), + (u'Soy Periodista', u'http://www.elespectador.com/noticias/soyperiodista/feed'), + (u'Investigación', u'http://www.elespectador.com/noticias/investigacion/feed'), + (u'Educación', u'http://www.elespectador.com/noticias/educacion/feed'), + (u'Salud', u'http://www.elespectador.com/noticias/salud/feed'), + (u'El Mundo', u'http://www.elespectador.com/noticias/elmundo/feed'), + (u'Nacional', u'http://www.elespectador.com/noticias/nacional/feed'), + (u'Bogotá', u'http://www.elespectador.com/noticias/bogota/feed'), + (u'Deportes', u'http://www.elespectador.com/deportes/feed'), + (u'Tecnología', u'http://www.elespectador.com/tecnologia/feed'), + (u'Actualidad', u'http://www.elespectador.com/noticias/actualidad/feed'), + (u'Opinión', u'http://www.elespectador.com/opinion/feed'), + (u'Editorial', u'http://www.elespectador.com/opinion/editorial/feed')] diff --git a/recipes/el_mundo_co.recipe b/recipes/el_mundo_co.recipe new file mode 100644 index 0000000000..a8186673d5 --- /dev/null +++ b/recipes/el_mundo_co.recipe @@ -0,0 +1,50 @@ + +from calibre.web.feeds.news import BasicNewsRecipe + +class ColombiaElMundo02(BasicNewsRecipe): + title = u'Periódico El Mundo' + __author__ = 'BIGO-CAVA' + language = 'es_CO' + cover_url = 'http://www.elmundo.com/portal/img/logo_mundo2.png' + remove_tags_before = dict(id='miga_pan') + #remove_tags_before = [dict(name='div', attrs={'class':'contenido'})] + remove_tags_after = [dict(name='div', attrs={'class':'cuadro_opciones_new1'})] + #keep_only_tags = [dict(name='div', id='miga_pan')] + remove_tags = [dict(name='div', attrs={'class':'ruta'}), + dict(name='div', attrs={'class':'buscador'}), + dict(name='div', attrs={'class':'iconos'}), + dict(name='div', attrs={'class':'otros_iconos'}), + dict(name='div', attrs={'class':'cuadro_opciones_new1'}), + dict(name='div', attrs={'class':'otras_noticias'}), + dict(name='div', attrs={'class':'notas_relacionadas'}), + dict(name='div', attrs={'id':'lateral_2'})] + oldest_article = 2 + max_articles_per_feed = 100 + remove_javascript = True + no_stylesheets = True + use_embedded_content = False + remove_empty_feeds = True + masthead_url = 'http://www.elmundo.com/portal/img/logo_mundo2.png' + publication_type = 'newspaper' + + extra_css = """ + p{text-align: justify; font-size: 100%} + body{ text-align: left; font-size:100% } + h1{font-family: sans-serif; font-size:150%; font-weight:bold; text-align: justify; } + h3{font-family: sans-serif; font-size:100%; font-style: italic; text-align: justify; } + """ + + + feeds = [(u'Opinión', u'http://www.elmundo.com/images/rss/opinion.xml'), + (u'Economía', u'http://www.elmundo.com/images/rss/noticias_economia.xml'), + (u'Deportes', u'http://www.elmundo.com/images/rss/deportes.xml'), + (u'Política ', u'http://www.elmundo.com/images/rss/noticias_politica.xml'), + (u'Antioquia', u'http://www.elmundo.com/images/rss/noticias_antioquia.xml'), + (u'Nacional ', u'http://www.elmundo.com/images/rss/noticias_nacional.xml'), + (u'Internacional', u'http://www.elmundo.com/images/rss/noticias_internacional.xml'), + (u'Servicios Públicos', u'http://www.elmundo.com/images/rss/noticias_servicios_publicos.xml'), + (u'Infraestructura', u'http://www.elmundo.com/images/rss/noticias_infraestructura.xml'), + (u'Mobilidad', u'http://www.elmundo.com/images/rss/noticias_movilidad.xml'), + (u'Derechos Humanos', u'http://www.elmundo.com/images/rss/noticias_derechos_humanos.xml'), + (u'Vida', u'http://www.elmundo.com/images/rss/vida.xml'), + (u'Cultura', u'http://www.elmundo.com/images/rss/cultura.xml')] diff --git a/recipes/el_tiempo.recipe b/recipes/el_tiempo.recipe index 3a10cca767..794e75df7d 100644 --- a/recipes/el_tiempo.recipe +++ b/recipes/el_tiempo.recipe @@ -2,18 +2,17 @@ from calibre.web.feeds.news import BasicNewsRecipe - - - class ColombiaElTiempo02(BasicNewsRecipe): title = u'Periódico el Tiempo' - language = 'es_CO' __author__ = 'BIGO-CAVA' + language = 'es_CO' cover_url = 'http://www.eltiempo.com/media/css/images/logo_footer.png' - remove_tags_before = dict(id='fb-root') + #remove_tags_before = dict(id='fb-root') + remove_tags_before = dict(id='contenidoArt') remove_tags_after = [dict(name='div', attrs={'class':'modulo reporte'})] keep_only_tags = [dict(name='div', id='contenidoArt')] remove_tags = [dict(name='div', attrs={'class':'social-media'}), + dict(name='div', attrs={'class':'recomend-art'}), dict(name='div', attrs={'class':'caja-facebook'}), dict(name='div', attrs={'class':'caja-twitter'}), dict(name='div', attrs={'class':'caja-buzz'}), diff --git a/recipes/portafolio.recipe b/recipes/portafolio.recipe index 1b442f68f7..4ba0d16c46 100644 --- a/recipes/portafolio.recipe +++ b/recipes/portafolio.recipe @@ -4,13 +4,13 @@ from calibre.web.feeds.news import BasicNewsRecipe class AdvancedUserRecipe1311799898(BasicNewsRecipe): title = u'Periódico Portafolio Colombia' - language = 'es_CO' __author__ = 'BIGO-CAVA' + language = 'es_CO' cover_url = 'http://www.portafolio.co/sites/portafolio.co/themes/portafolio_2011/logo.png' remove_tags_before = dict(id='contenidoArt') remove_tags_after = [dict(name='div', attrs={'class':'articulo-mas'})] keep_only_tags = [dict(name='div', id='contenidoArt')] - oldest_article = 1 + oldest_article = 2 max_articles_per_feed = 100 remove_javascript = True no_stylesheets = True diff --git a/recipes/revista_semana.recipe b/recipes/revista_semana.recipe new file mode 100644 index 0000000000..1137764932 --- /dev/null +++ b/recipes/revista_semana.recipe @@ -0,0 +1,11 @@ +from calibre.web.feeds.news import BasicNewsRecipe + + +class AdvancedUserRecipe1317341570(BasicNewsRecipe): + title = u'Revista Semana' + __author__ = 'BIGO-CAVA' + language = 'es_CO' + oldest_article = 7 + max_articles_per_feed = 100 + + feeds = [(u'Revista Semana', u'http://www.semana.com/rss/Semana_OnLine.xml')]