On May 24, Jamie Rytlewski <[EMAIL PROTECTED]> wrote:

> Second of all, I'm not seeing it in the flat files, but is there
> any way to get IMDB id when performing the imdbpy2sql.py?

Not without about 3 millions of queries to their web site (for both
movies and persons).  personID and movieID are not in the plain text
data files, so we have to use different numbers, as ID.

Theoretically it would be quite simple to fetch these values, but
given that numbers I won't even consider to add it as an optional
feature: even with a very fat pipe to the net, it would be way too
slow (and too aggressive against their web site).

> I see the table title has a field called imdb_id, but in my database
> they are all null.

If you access the data with the 'sql' data access system, as you
retrieve information about a person or movie imdbID (the ID used
by the IMDb server), the imdb_id field is updated, to cache the
result.

E.g.:
  from imdb import IMDb
  i = IMDb('sql', uri=...)
  movie = i.search_movie('Ninja Terminator (1985)')[0]
  i.get_imdbID(movie) # or i.get_imdbMovieID(movie.movieID)

if you're connected to the net (and I my code still works: I haven't
checked it in a long time ;-) you'll get the imdbID for the movie
and it will also be stored in imdb_id (the imdbID are guaranteed
to be permanent and unique, so it's lecit to cache these values)

> If so, does anyone have a way to get the imdb_id,
> just the same way you can with the search_movie.py.

As you can see from the search_movie.py script, it calls
i.get_imdbID(movie) to get the imdbID.


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

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Imdbpy-devel mailing list
Imdbpy-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-devel

Reply via email to