This python package is written in pure Python 3 to access the IMDb’s database and used it.
You can read about this python module from GitHub.
The development team comes with this DISCLAIMER to read the IMDb’s conditions of use on their website.
First I start the install process with the pip tool:
1 2 3 4 5 6 7 8 9 10 | C:\Python364\Scripts>pip install IMDbPY Requirement already satisfied: IMDbPY in c:\python364\lib\site-packages Requirement already satisfied: lxml in c:\python364\lib\site-packages (from IMDbPY) Requirement already satisfied: sqlalchemy-migrate in c:\python364\lib\site-packages (from IMDbPY) Requirement already satisfied: SQLAlchemy in c:\python364\lib\site-packages (from IMDbPY) Requirement already satisfied: pbr>=1.8 in c:\python364\lib\site-packages (from sqlalchemy-migrate->IMDbPY) Requirement already satisfied: decorator in c:\python364\lib\site-packages (from sqlalchemy-migrate->IMDbPY) Requirement already satisfied: six>=1.7.0 in c:\python364\lib\site-packages (from sqlalchemy-migrate->IMDbPY) Requirement already satisfied: sqlparse in c:\python364\lib\site-packages (from sqlalchemy-migrate->IMDbPY) Requirement already satisfied: Tempita>=0.4 in c:\python364\lib\site-packages (from sqlalchemy-migrate->IMDbPY) |
This is my source code to test it and working well.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # start with IMDb python class from imdb import IMDb imd = IMDb('http') print("-===-") # search movies by title # and show the long imdb canonical title and movieID of the results. title = imd.search_movie("Under the Dome") for item in title: print(item['long imdb canonical title'], item.movieID) print("-===-") # search for a person for person in imd.search_person("Ana de Armas"): print(person.personID, person['name']) print("-===-") # get 5 movies tagged with a keyword movies_keyword = imd.get_keyword('novel', results=5) for item in movies_keyword: print(item['long imdb canonical title'], item.movieID) print("-===-") # get top 250 from top movies top250 = imd.get_top250_movies() for item in top250: print(item['long imdb canonical title'], item.movieID) print("-===-") print("top 250 -=> ") # get bottom 100 from top movies bottom100 = imd.get_bottom100_movies() print("bottom 100 -=> ") for item in top250: print(item['long imdb canonical title'], item.movieID) |