Thank you for clearing that up for me! 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) 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. Regards Jonas Op 26-nov-2009, om 16:35 heeft Davide Alberani het volgende geschreven: > On Nov 26, Jonas Geiregat <jo...@geiregat.org> wrote: > >> When trying out the method get_imdbMovieId() it doesn't return an >> object. It does return the same string I entered as param. >> >>>>> ai.get_imdbMovieID("Snatch") >> 'Snatch' >> >> Is this method not implemented yet ? > > It is, but it serves another purpose. :-) > See documentation about it in README.package, README.devel and > in the code itself. > > Basically, it takes a movieID specific to the used data access > system (i.e. "http", "httpThin", "mobile" or "sql") and convert > it to the unique imdbID used on the imdb.com web site. > For "http"/"httpThin" and "mobile", it does nothing since they > use the same ID (i.e., the movieID _is_ the imdbID). > But "sql" internally uses IDs that are valid only locally (to your > installation); this means that a query to the imdb.com site must > be issued, to convert it to the "real" imdbID (beware that it can > return None). > > Generally speaking, it's better to use the get_imdbID method, which > takes a Movie/Person/Character/Company instance, and not a > movieID/personID/characterID/companyID. > > E.g.: > from imdb import IMDb > ia = IMDb('sq', uri='mysql://USER:p...@localhost/imdb') # my local DB. > tu = ia.search_movie(u'The Untouchables (1987)')[0] # First item. > print tu.movieID # will print 558195, valid only for my database. > print ia.get_imdbID(tu) # will print '0094226', that is the ID used > # by imdb.com > # The same thing, with the less flexible/smart get_imdbMovieId: > print ia.get_imdbMovieId(tu.movieID) > > > HTH, > -- > Davide Alberani <davide.alber...@gmail.com> [GPG KeyID: 0x465BFD47] > http://erlug.linux.it/~da/ Met vriendelijke groeten, Jonas Geiregat jo...@geiregat.org ------------------------------------------------------------------------------ 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