In this article we will see how we can get the image/head-shot of the person from the person object, imdb person object act similar to dictionary therefore getting image from person object is similar from getting required information from the dictionary.
In order to do this we have to do the following –
1. Get the person object with the help of id by using get_person method
2. Get the image link from it using result[‘headshot’] as keys
3. Print the result
Note : Output will be the link of the image i.e string data type not actual image
Below is the implementation
Shahid Kapoor https://m.media-amazon.com/images/M/MV5BMjc5NTM5NjUyMV5BMl5BanBnXkFtZTgwMDEwMzU1OTE@._V1_UX67_CR0, 0, 67, 98_AL_.jpg
When we open the output link this will get displayed
Nawazuddin Siddiqui https://m.media-amazon.com/images/M/MV5BMTU5NTQwMTI0NV5BMl5BanBnXkFtZTcwNzQyNTgxOA@@._V1_UX67_CR0, 0, 67, 98_AL_.jpg
When we open the link this will be shown
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 – Retrieving person using person ID
- Python IMDbPY – Getting Person name from searched name
- Python IMDbPY – Getting person ID from searched persons
- 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 – 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
- Python IMDbPY – Getting released year of movie from movie object
- Python IMDbPY – Getting bottom 100 movies
- Python IMDbPY – Getting top 250 movies
- Python IMDbPY – Getting title from searched movie
- Python IMDbPY – Getting name from searched company
- Python IMDbPY – Getting movie ID from searched movies
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.