View Single Post
Old 12-12-2010, 09:59 AM   #87
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,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by Bertrand View Post
Hi

I'm using the plugin Search the Internet, and it works great.

One problem though. I have french books with accented letters and when doing a search on Amazon, here's an example of what I get :

"De l'inconvénient d'être né".

Which of course doesn't return any result.

When I perform a search directly on the website there's no problem.

On the other hand, I've added an other site (www.fnac.fr) in the site list and and it works well.

So what can cause the problem ?

Any thing I can do ?

Thanks.
I only have English books sorry so when it comes to handling other languages I have no experience. That's why all my plugins come with a "it works for me" warning

Without having a specific title name to test (put one here if you can) I can't verify this but my guess would be some sort of unicode characterset issue. My plugin does no unicode handling currently.

As to why it is one website and not the other. Ultimately what the plugin is trying to achieve is to generate a URL that matches what you see in the browser after you type that same title into the website's own search box. It could be that Amazon is doing some sort of translation that your other website is not or vice versa. Grab the search URLs that the website generates when you directly search on them and have a look at them, and then you can figure out what code needs to be changed in the plugin to match. The convert_to_search_text method is my very basic and crude conversion that works for a number of websites that I needed but clearly is not every situation.

It maybe that you need to add support for some alternate "tokens" for certain websites if unicode handling does not generically solve your problem across the sites you search. For instance this website http://www.isfdb.org/ has a very bespoke and picky search syntax that the plugin is not compatible with. If I decide I want it in the menu (for now I get to it via Wikipedia) then I would have to add a new token like {author_fn_ln} and corresponding code within the plugin for it so as to support both variations.
kiwidude is offline