omdbapi / OMDb-API

The Open Movie Database Bug Tracking
422 stars 21 forks source link

Having trouble with titles that have apostrophes in them #148

Open blairg23 opened 5 years ago

blairg23 commented 5 years ago

Some examples that return Movie not found!:

https://www.omdbapi.com?s=thats my boy&y=2012&plot=full
https://www.omdbapi.com?s=charlies angels&y=2000&plot=full
https://www.omdbapi.com?s=coogans bluff&y=1968&plot=full

The same results if using t= query parameter. It would be really nice to do fuzzy searching over titles and there are some great libraries out there to do it!

vince1393 commented 4 years ago

Potential solution is to encode the name of the movie:

http://www.omdbapi.com/?t=Charlie%27s%20Angels&y=2000&plot=full

I've used the encodeURIComponent() function in JavaScript, I'm sure that other languages have something similar