On Feb 18, Erik Mägi <[email protected]> wrote:

> Greetings,

Hi!

> The subject line pretty much asks the question by itself :) I am
> using 'sql' as the access system and was wondering if there was a
> way to get the search_movie() method to return the title table's
> id along with the other info it returns?

Once you get a list of movies returned by search_movie, their movieID
attributes _are_ the ID internally used in the 'title' table.

E.g.:
  from imdb import IMDb
  ia = IMDb('sql', uri=...)

  for movie in ia.search_movie(u'matrix'):
      print movie.movieID

what is shown are the 'id' in the 'title' table.
The same goes for any other kind of object (Person, Character, Company).

Keep in mind that in this case the movieID is NOT the same ID
used by the IMDb web site.
To get these imdbID, you can use the code:
  ia.get_imdbID(movie)

But it requires an internet connection (and it's slow).


HTH,
-- 
Davide Alberani <[email protected]> [PGP KeyID: 0x465BFD47]
http://erlug.linux.it/~da/

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Imdbpy-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/imdbpy-help

Reply via email to