Related Articles

Related Articles

Python IMDbPY – Default info of Person object
  • Last Updated : 22 Apr, 2020

In this article we will see how we can achieve the set of information which retrieved by default by get_person method, with the help of get_person_infoset we can know all the information that we can achieve of the person. But all the information is not extracted as it will be time consuming process.

In order to know the default information that a movie object extracts we will use default_info method.

Syntax : person.default_info

Here movie is imdb Person object

Argument : It takes no argument



Return : It return list

Below is the implementation

filter_none

edit
close

play_arrow

link
brightness_4
code

# importing the module
import imdb
   
# creating instance of IMDb
ia = imdb.IMDb()
   
# ID
code = "2690647"
    
# searching the Id
person = ia.get_person(code)
  
# getting default info
info = person.default_info
  
# printing name
print(person['name'])
  
# printing the info
print(info)

chevron_right


Output :

Pankaj Tripathi
('main', 'filmography', 'biography')

Another example

filter_none

edit
close

play_arrow

link
brightness_4
code

# importing movie
from imdb.Person import Person
  
# getting default info
info = Person.default_info
  
# printing the info
print(info)

chevron_right


Output :

('main', 'filmography', 'biography')

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.

My Personal Notes arrow_drop_up
Recommended Articles
Page :