I'm use the imdbpy package to retrieve movies info, but I can't seem to get the soundtrack information. I've checked and the movie that I'm using as a test (Toystory) has a soundtrack on the iMDb website, and soundtrack
is on ia.get_movie_infoset()
, and I tried to retrieve the info in three different ways:
#attempt 1
movie["soundtrack"]
#attempt 2
ia.update(movie, info=('soundtrack'))
movie["soundtrack"]
#attempt 3
ia.get_movie_soundtrack(movieID)
The results were exceptions for the first two and {'titlesRefs': {}, 'data': {}, 'charactersRefs': {}, 'namesRefs': {}}
for the third one.
Does anyone know how to get the info?
A bug in the parser prevented it to work correctly. It's now fixed in the repository; if possibly, give it a try.
This code should work:
from imdb import IMDb
ia = IMDb()
ts = ia.get_movie('0114709')
ia.update(ts, 'soundtrack')
print ts['soundtrack']