Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-04-2011, 10:50 AM   #1
stachuman
Junior Member
stachuman began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2011
Device: Kindle 3
Tricky problem with built-in recipe - need your help.... :(

Dears,

There is a built-in recipe - 'Rzeczpospolita OnLine' - in short words - on linux this recipe does not work, on on PC under windows it works, on other - not..

So, I do not know python, anyway - did try to investigate ( running calibre in debug, also - same - under linux ) and my guess is as follow - there is something wrong with rss links ( not being 'translated' ?? )

The recipe changes the link slightly adding 'print=tak' - to get the printable version -
taking the link (as example )

http://rss.feedsportal.com/c/32536/f...ml/story01.htm

If I'd put that into web viewer - it is immediatelly translated ( java code I guess ) into: http://www.rp.pl/artykul/549282,635828.html

Function in recipe would convert it into: http://www.rp.pl/artykul/635828.html?print=tak

What is absolutely correct - and get what it should - unfortunately what I see in the log is:


http://rss.feedsportal.com/c/32536/f....htm?print=tak

So - the original rss link is not 'converted' into desired one.

I don't understand why on one PC - even this - not-so-correct - link is working fine ( under windows ), while on the other PC - this is not working.

To be sure - I use same recipe - I did copy from working PC the recipe code and used it under linux as a custom one.


Any help.... please...

Thanks,
Stan
stachuman is offline   Reply With Quote
Old 05-04-2011, 11:38 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You need to implement the get_article_url method in your recipe to get the correct URL from the RSS feed.
kovidgoyal is offline   Reply With Quote
Advert
Old 05-04-2011, 03:07 PM   #3
stachuman
Junior Member
stachuman began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2011
Device: Kindle 3
Hello,

Thanks for suggestion but... hm, not sure - it will help me yet - I did investigate further and what I found is - from RSS the link guide to a web page which contain only advert and link to the real article.

Unfortunately this page is shown not always - sometime yes, sometime no (not sure of condition) - the link on this page seems to have constant label ( something like - 'click to get the article' ... )

So, in recipe I'd need to set a condition - and eventually follow the link to be at the proper page - I guess - I'll need to override the method you gave me - right? Comparing the input url - if it points to url with advert - find on the page the proper link and return it - sounds good?
stachuman is offline   Reply With Quote
Old 05-04-2011, 03:08 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes, that is what you need to do.
kovidgoyal is offline   Reply With Quote
Reply

Tags
recipe


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
USA Today built in recipe problem on Kindle3 t0s Recipes 12 02-03-2012 08:08 PM
Adding a feed to the built-in NY Times recipe t0s Recipes 3 03-03-2011 11:26 AM
Built in Storage Drive Problem roytravis HanLin eBook 4 11-12-2010 07:00 PM
Problem Reading In-Built Storage basshead HanLin eBook 15 06-03-2009 05:59 AM
Built instrorage problem roytravis HanLin eBook 5 01-20-2009 07:15 PM


All times are GMT -4. The time now is 08:37 PM.


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