Friday, October 10, 2025
HomeLanguagesPython IMDbPY – Getting birth date of person

Python IMDbPY – Getting birth date of person

In this article we will see how we get the birth date of any person, we can get retrieve the person data with the help of get_person method by passing the person id. get_person method returns a imdb Person object which can be used as a dictionary i.e. they can be queried by giving the key of the data, here key will be birth date.

Syntax : person[‘birth date’] Here person is the Person object return by the get_person method. Return : It return string which is birth date.

Below is the implementation. 

Python3




# importing the module
import imdb
  
# creating instance of IMDb
ia = imdb.IMDb()
  
# person id
person_id = "1596350"
  
# getting person details
search = ia.get_person(person_id)
 
# printing the search
# printing name and birth date
print(search['name'] + "  " +search['birth date'])


Output :

Nawazuddin Siddiqui  1974-05-19

Time complexity of the code is O(1) as it involves only a single operation which is accessing the details of the person from the IMDb object.

Space complexity of the code is O(1) as it does not require any additional memory to store the search results.

Another example 

Python3




# importing the module
import imdb
  
# creating instance of IMDb
ia = imdb.IMDb()
  
# person id
person_id = "0000206"
  
# getting person details
search = ia.get_person(person_id)
 
# printing the search
# printing name and birth date
print(search['name'] + "  " +search['birth date'])


Output :

Keanu Reeves  1964-09-02
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32350 POSTS0 COMMENTS
Milvus
87 POSTS0 COMMENTS
Nango Kala
6718 POSTS0 COMMENTS
Nicole Veronica
11880 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11941 POSTS0 COMMENTS
Shaida Kate Naidoo
6838 POSTS0 COMMENTS
Ted Musemwa
7100 POSTS0 COMMENTS
Thapelo Manthata
6794 POSTS0 COMMENTS
Umr Jansen
6794 POSTS0 COMMENTS