Skip to content
Related Articles

Related Articles

Improve Article

Python IMDbPY – Default info of Company 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_company method, with the help of get_company_infoset we can know all the information that we can achieve of the company. 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 : company.default_info

Here movie is imdb Company object

Argument : It takes no argument



Return : It return list

Below is the implementation




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

Output :

Marvel Studios
('main', )

Another example




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

Output :

Pixel
('main', )

 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. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course




My Personal Notes arrow_drop_up
Recommended Articles
Page :