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.
import imdb
ia = imdb.IMDb()
code = "0051941"
search = ia.get_company(code)
print (search)
|
Output :
Marvel Studios
Another example :
import imdb
ia = imdb.IMDb()
code = "0022125"
search = ia.get_company(code)
print (search)
|
Output :
Pixel
Last Updated :
22 Apr, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...