HomeLanguagesPython IMDbPY – Retrieving company using company ID

Python IMDbPY – Retrieving company using company ID

In this article we will see how we can retrieve the data of company using its company ID, company id is the unique id given to each company by IMDb. We can use search_company method to search the companies by their name but it gives many companies as they have same names therefore retrieving a company by its id is a better option.

In order to search a company by its id we use get_company method.

Syntax : imdb_object.get_company(id)

Argument : It takes string as argument which is company id

Return : It returns imdb Company object.

Below is the implementation.




# importing the module
import imdb
   
# creating instance of IMDb
ia = imdb.IMDb()
   
# ID
code = "0051941"
   
# searching the Id
search = ia.get_company(code)
  
# printing the search
print(search)


Output :

Marvel Studios

Another example :




# importing the module
import imdb
   
# creating instance of IMDb
ia = imdb.IMDb()
   
# ID
code = "0022125"
   
# searching the Id
search = ia.get_company(code)
  
# printing the search
print(search)


Output :

Pixel
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32688 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
7057 POSTS0 COMMENTS
Nicole Veronica
12198 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12293 POSTS0 COMMENTS
Shaida Kate Naidoo
7182 POSTS0 COMMENTS
Ted Musemwa
7447 POSTS0 COMMENTS
Thapelo Manthata
7160 POSTS0 COMMENTS
Umr Jansen
7150 POSTS0 COMMENTS