Python IMDbPY – Searching a company
In this article we will see how we can search the company in the IMDb data base, there are many companies related to the film industries like marvel studios, disney etc are present in the IMDb data base.
In order to search the company we will use search_company method.
Syntax : imdb_object.search_company(company_name)
Argument : It takes string as argument.
Return : It returns list of all similar named company.
Below is the implementation.
Python3
import imdb
ia = imdb.IMDb()
company_name = "Marvel Studios"
search = ia.search_company(company_name)
for i in search:
print (i)
|
Output :
Marvel Studios
Barvel Studios
Marvelous 1st Studio
Next Level Studios
Boss Level Studios
Caravel Studios
Land Marvel Animation Studios
Another example:
Python3
import imdb
ia = imdb.IMDb()
company_name = "Alt Bala ji"
search = ia.search_company(company_name)
print (search)
|
Output :
[Company id:0642697[http] name:_ALTBalaji [in]_, Company id:0779280[http] name:_ALT Balaji [in]_]
Last Updated :
18 Jan, 2022
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...