View Single Post
Old 03-03-2013, 08:13 PM   #184
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,636
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@dirgeon - apologies for the delayed response. I wasn't aware goodreads even offered a url option for adding books. Is there any website documentation you can point me to about this?

As for your particular issue, clearly you have way more knowledge about the requirements of their url than I do. The one thing I can suggest is that you add some code to the plugin to print the URL out and use that to check against the requirements of the API. It could be a problem with the template language functions that you are trying to use, chaley is the guru on those. However by printing the actual URL being passed as a result of applying the template you should be able to see what the output is.

To save you the trouble I am attaching a zip file with a version of this plugin that prints out the url to the debug log. So run calibre in debug mode (from the Preferences dropdown menu), use the plugin to search using your url and then check the log file to see what text was actually generated by the plugin, just in case that differs with what ends up being displayed in your browser due to a redirection by Goodreads.

And if you want to test the output url without actually hitting the goodreads website each time, edit the action.py file inside the zip, and change line 145 sticking a # in front so it says #openurl(...) instead of openurl(...)
Attached Files
File Type: zip Search The Internet.zip (186.7 KB, 319 views)
kiwidude is offline   Reply With Quote