View Single Post
Old 08-22-2011, 03:41 PM   #96
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,733
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Thx Kovid. Unfortunately the problem with doing that is it "undoes" the other stuff that the quoting is trying to achieve. Take for example this book author/title:

E. M. Cioran De l'inconvénient d'être né

To search Amazon.com.fr for that book, what I need supplied is for the URL to be in this format:
Code:
http://www.amazon.fr/s/ref=nb_sb_noss?url=search-alias%3Dstripbooks&field-keywords=E.%20M.%20Cioran+De%20l%27inconv%E9nient%20d%27%EAtre%20n%E9
My code I listed above using open_url(QUrl.fromEncoded(url)) does exactly that.

However if instead I use open_url(QUrl(unquote(url))) then what gets generated is this:
Code:
http://www.amazon.fr/s/ref=nb_sb_noss?url=search-alias=stripbooks&field-keywords=E.%20M.%20Cioran+De%20l%27inconv%C3%A9nient%20d%27%C3%AAtre%20n%C3%A9
which corresponds to something like:
"E. M. Cioran De l'inconvénient d'être né"

My head hurts
kiwidude is offline   Reply With Quote