On Nov 26, Jonas Geiregat <jo...@geiregat.org> wrote: > I was hoping the method would give me a more accurate search result. > For example when I search_movie for "the thaw" it returns a > different movie. > >>> ai.search_movie("the thaw")[0] > <Movie id:0139134[http] title:_Cruel Intentions (1999)_> > > But if I search the website for the thaw it retuns > * Popular titles (the thaw isn't in it) > * Exact matches (the thaw is in it) > * Partial matches (the thaw isn't in it)
Exactly. For your search ("the twat"), IMDbPY issues this query: http://akas.imdb.com/find?s=tt;mx=20;q=the+thaw > What I would like to see is that if you search for a movie and you > have spelled the correct name it should return the correct movie > you are searching for. So you want to exclude searches on AKA titles and the likes (I'm not really sure why Cruel Intentions shows up as the first result, but I don't question the IMDb.com internals ;-) Maybe you can do it _after_ the search, iterating over the results and keeping only the "correct" matches (a better idea would be to use the difflib module and keep only the "good enough for you" matches). I don't think you can exclude AKAs on a query, and IMDb's power search [1] for titles return even worse results. If you know the _exact_ "long imdb title" you can try an "Exact Primary Title Search" using IMDbPY: ia.title2imdbID('The Thaw (2009)') It will return the movieID of the movie, or None if unable to guess it. Beware that in many cases the "long imdb canonical title" will include the imdbIndex - a roman number after the year, like "10 Bullets (2007/II)". I don't think this is a viable solution for you. +++ [1] http://akas.imdb.com/search -- Davide Alberani <davide.alber...@gmail.com> [GPG KeyID: 0x465BFD47] http://erlug.linux.it/~da/ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Imdbpy-help mailing list Imdbpy-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/imdbpy-help