Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 02-24-2011, 07:20 AM   #1
amontiel69
Junior Member
amontiel69 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2011
Device: Kindle
Recipe for La Nacion of Costa Rica

Hi there,

I want to create a recipe for a Costa Rican newspaper called La Nacion (http://www.nacion.com). The link to the page where I got the feeds from is http://www.nacion.com/Generales/Pagi...rales/RSS.aspx. I tried to create it myself and this is what I have so far

class AdvancedUserRecipe1298476526(BasicNewsRecipe):
title = u'La Nacion'
oldest_article = 7
max_articles_per_feed = 10
no_stylesheets = True
remove_tags = [dict(name='div', attrs={'class':['footer_derechos', 'compartir', 'opinar_forma']})]

feeds = [(u'Portada', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=portada'), (u'Ultima Hora', u'http://www.nacion.com/Generales/RSS/UltimaHoraRss.aspx'), (u'Nacionales', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=elpais'), (u'Sucesos', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=sucesos'), (u'Deportes', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=deportes'), (u'Internacionales', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=mundo'), (u'Econom\xeda', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=economia'), (u'Aldea Global', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=aldeaglobal'), (u'Opini\xf3n', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=opinion')]


I am not totally happy with the results as I was unable to remove any of the DIV called compartir, footer_derechos and opinar_forma are just copyright notices and links to social networks. Also, the layout is not entirely satisfactory as there are lots of extra stuff that needs to be removed, such as the weather information on the front page.

Can anyone help me make this a better looking recipe? I know a lot of Costa Rican Kindle users will be very happy.

Thanks a lot

Last edited by amontiel69; 02-24-2011 at 08:19 AM. Reason: Added link to newspaper
amontiel69 is offline   Reply With Quote
Old 02-24-2011, 12:41 PM   #2
amontiel69
Junior Member
amontiel69 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2011
Device: Kindle
After tweaking the recipe a bit more, this is what I have

class AdvancedUserRecipe1298476526(BasicNewsRecipe):
title = u'La Nacion'
oldest_article = 7
max_articles_per_feed = 10
no_stylesheets = True
remove_tags = [dict(attrs={'class':['scroller_clima','col320_noborde','redes_connect', 'simple_overlay','proyector_mcm']}),dict(id=['footer_derechos', 'compartir', 'opinar_forma','formulario_encabezado','footer','h eader','rating','herramientas','comentar_tool_bott om','relacionadas','comentar'])]

feeds = [(u'Portada', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=portada'), (u'Ultima Hora', u'http://www.nacion.com/Generales/RSS/UltimaHoraRss.aspx'), (u'Nacionales', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=elpais'), (u'Sucesos', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=sucesos'), (u'Deportes', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=deportes'), (u'Internacionales', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=mundo'), (u'Econom\xeda', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=economia'), (u'Aldea Global', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=aldeaglobal'), (u'Opini\xf3n', u'http://www.nacion.com/Generales/RSS/EdicionRss.aspx?section=opinion')]

This recipe downloads the articles and removes the extra fluff, however, I want to keep the newspaper's logo on the frontpage and also format the layout a little better. Any help is welcome

Thanks
amontiel69 is offline   Reply With Quote
Advert
Old 05-15-2011, 01:08 AM   #3
dieguille
Junior Member
dieguille began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2011
Device: Kindle
Hola amontiel69,

No logro que me funcione bajar La Nacion. Me cuesta aun mas cuando no se nada de idioma de computadora. Lo mas cerca que llegue es bajar todo el codigo de La Nacion en formato de ebook jaja. Me podrias ayudar?
dieguille is offline   Reply With Quote
Old 01-28-2013, 11:53 AM   #4
doudelgado
Member
doudelgado began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jan 2013
Location: Costa Rica
Device: Nook Simple Touch
amontiel ibas por buen camino yo tambien he querido poder leer dicho periodico en mi eReader despues de que note que La Nacion no ofrece dicho documento me tome a la tarea de realizar un script (recipe) que me brindara dicho ebook y el resultado a mi parecer es bastante satisfactorio porque no lo pruebas y me das tus observaciones, lo encontraras en la siguiente cadena https://www.mobileread.com/forums/sho...d.php?t=203982
doudelgado is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SALUDOS FROM COSTA RICA PAULG Introduce Yourself 5 02-01-2013 05:51 AM
Greetings from Costa Rica RichardBlank Introduce Yourself 5 02-01-2013 05:40 AM
Recipe works when mocked up as Python file, fails when converted to Recipe ode Recipes 7 09-04-2011 04:57 AM
New recipe kiklop74 Recipes 0 10-05-2010 04:41 PM
costa del sol erotika roberto14 Lounge 0 02-09-2004 07:04 AM


All times are GMT -4. The time now is 05:19 PM.


MobileRead.com is a privately owned, operated and funded community.