I'm using the IMDbPY library to scrape details for a large number of movies when I came across the following strange behaviour
import imdb
s_result = ia.search_movie('"Jobs"')
movie = s_result[0]
ia.update(movie)
for x in xrange(3):
print movie['cast'][x]
The output is:
>>Ashton Kutcher
Dermot Mulroney
Josh Gad
Which is good, but when I try and use an iterator:
print [movie['cast'][x] for x in xrange(3)]
The output is:
>>>[<Person id:0005110[http] name:_Kutcher, Ashton_>, <Person id:0000551[http] name:_Mulroney, Dermot_>, <Person id:1265802[http] name:_Gad, Josh_>]
Please tell me what I'm doing wrong?