Does Imdbpy2sql.py Export Soundtracks To Mysql?
I downloaded all data from imdb.org/interfaces and fed that to imdbpy2sql.py. The script sucessfully imports all movies, actors, etc. But it does not create tables for soundtracks
Solution 1:
Movie information are stored not normalized (for performance reasons at insert-time) in the movie_info table. Here, the info_type_id field specify which kind of information is stored in the info field.
You can find the list of valid info_type IDs in the info_type table. For example, on my system, 'soundtrack' has ID 14.
A simple query will give you the information you're looking for. Obviously you can also use IMDbPY directly and avoid doing the query by yourself, but that depends on what you need.
For example:
from imdb import IMDb
ia = IMDb('sql', uri='mysql://username:password@localhost/imdb')
inglorious = ia.search_movie('Inglorious Basterds')[0]
ia.update(inglorious)
print inglorious['soundtrack']
Post a Comment for "Does Imdbpy2sql.py Export Soundtracks To Mysql?"