Python IMDbPY – Default info of Movie object

In this article we will see how we can achieve the set of information which retrieved by default by get_movie method, with the help of get_movie_infoset we can know all the information that we can achieve of the movie. 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 : movie.default_info

Here movie is imdb Movie 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 = "1187043"
    
# searching the Id
movie = ia.get_movie(code)
  
# getting default info
info = movie.default_info
  
# printing movie title
print(movie['title'])
  
# printing the info
print(info)

chevron_right


Output :

3 Idiots
('main', 'plot')

Another example

filter_none

edit
close

play_arrow

link
brightness_4
code

# importing the module
import imdb
   
# creating instance of IMDb
ia = imdb.IMDb()
   
# ID
code = "4434004"
    
# searching the Id
movie = ia.get_movie(code)
  
# getting default info
info = movie.default_info
  
# printing movie title
print(movie['title'])
  
# printing the info
print(info)

chevron_right


Output :

Udta Punjab
('main', 'plot')

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

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.