In this article we will see how we can get the movie id from searched movies, movie id is basically unique id given to each movie as movie name can be same but id will be distinct. We use
search_movie method to search movies with the same name.
In order to get movie id we use
Syntax : movies.movieID
Here movies is the list of movies returned by search_movie and movies refer to first element in list
Argument : It takes no argument.
Return : It return string which is Movie ID
Below is the implementation.
Udta Punjab : 4434004 Diljit Dosanjh (Udta Punjab) : 6574338
Another example :
3 Idiots : 1187043 3 idiotas : 3685624 3 Idiots : 12049418 3 Idiots w/ GUNS : 0222441 3 Idiots on Wheels : 6689378 3 Idiots Try Candy! : 8474256 3 Idiots; How Cho Copes with Slump : 9419952 The Idiots : 0154421 Idiots : 0341476 Vidiots : 5830890 Idiotest : 3607166 Idiotsitter : 3532050 The Idiot : 0043614 Idioten : 7147976 Idiots : 1687235 4 Idiots : 6470848 Idiots : 2622956 The Idiot : 0051762 Idiots : 6866900 Idiot : 0366028
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Python IMDbPY – Adding info set to the searched movies
- Python IMDbPY – Getting title from searched movie
- Python IMDbPY – Getting released year of movie from movie object
- Python IMDbPY - Retrieving movie using movie ID
- Python IMDbPY – Getting bottom 100 movies
- Python IMDbPY – Getting top 250 movies
- Python IMDbPY - Getting list of movies performed by the actor
- Python IMDbPY – Getting Person name from searched name
- Python IMDbPY – Getting name from searched company
- Python IMDbPY – Getting person ID from searched persons
- Python IMDbPY – Getting company ID from searched companies
- Python IMDbPY – Searching movies matching with keyword
- Python IMDbPY – Movies Information in XML format
- Python IMDbPY – Getting role of person in the movie
- Python IMDbPY – Adding info set to the searched persons
- Python IMDbPY – Movie info set
- Python IMDbPY – Default info of Movie object
- Python IMDbPY - Searching a movie
- Python IMDbPY – Info set to keys of Movie object
- Python IMDbPY – Retrieving art department cast from the movie object
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.