In this article we will see how we can get the person id from searched person, person id is basically unique id given to each person names can be same of some people but id will be distinct. We use
search_person method to get people with the same name.
In order to get person id we use
Syntax : persons.personID
Here persons is the list of person returned by search_person and persons refer to first element in list
Argument : It takes no argument.
Return : It return string which is Person ID
Below is the implementation.
Ayushmann Khurrana : 4731677
Pankaj Tripathi : 2690647 Pankaj Tripathi : 11337375 Sankalp Raj Tripathi : 9704712
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 – Getting Person name from searched name
- Python IMDbPY – Adding info set to the searched persons
- Python IMDbPY – Getting title from searched movie
- Python IMDbPY – Getting name from searched company
- Python IMDbPY – Getting movie ID from searched movies
- Python IMDbPY – Getting company ID from searched companies
- Python IMDbPY – Retrieving person using person ID
- Python IMDbPY – Adding info set to the searched movies
- Python IMDbPY – Getting birth date of person
- Python IMDbPY - Getting birth place of person
- Python IMDbPY - Getting IMDb index of person
- Python IMDbPY - Getting alternate names of person
- Python IMDbPY – Getting role of person in the movie
- Python IMDbPY - Getting image(head-shot) of person
- Python IMDbPY – Person info set
- Python IMDbPY – Default info of Person object
- Python IMDbPY – Searching a person
- Python IMDbPY – Info set to keys of Person object
- Python IMDbPY - Checking if person is part of movie or not
- Python IMDbPY – Person Information in XML format