[imdbpy-Help] How to get a list of all movies and its actors
552 views
Skip to first unread message
Li Xu
unread,
Feb 27, 2014, 4:53:31 PM2/27/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to imdbpy...@googlegroups.com
Hi!
I am currently doing a project to analysis movie data and find out what makes a good movie revenue. I am quite new in this field, and I met one question, I use "get_movie( )" in IMDBpy tot the movie title. But I find out the argument in get_movie() seems need to numbers, it can't be a variable stored integers (I want to make a for loop and make the variable changes all the time, to get all movies from IMDB).
Can someone help me out? Tks@
Davide Alberani
unread,
Feb 28, 2014, 5:10:59 PM2/28/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
Basically, what you want can be done with a list. E.g.:
list_of_movie_ids = ['0133093', '0234215', '0242653']
for movie_id in list_of_movie_ids:
...use movie_id in the call to get_movie()...
To generate a sequence you can use the range or xrange
builtin python functions.