Important notice
Starting in April 2026, support for parsing IMDb web pages was removed. Cinemagoer now works exclusively with the IMDb non-commercial datasets.
If you need IMDb web-page parsing, see cinemagoerng, which is focused on that use case.
Starting in April 2026, support for parsing IMDb web pages was removed. Cinemagoer now works exclusively with the IMDb non-commercial datasets.
If you need IMDb web-page parsing, see cinemagoerng, which is focused on that use case.
This project and its authors are not affiliated in any way to Internet Movie Database Inc.; see the disclaimer file for details about data licenses.
Cinemagoer reads data from a local database populated from IMDb datasets. First, download and import the data:
# Download the *.tsv.gz files from https://datasets.imdbws.com/
download-from-s3
# Import them into a local SQLite database
s32cinemagoer.py /path/to/imdb-tsv-files/ sqlite:///cinemagoer.db
Then use Cinemagoer to query the database:
from imdb import Cinemagoer
# open the database populated with s32cinemagoer.py
ia = Cinemagoer('s3', uri='sqlite:///cinemagoer.db')
# get a movie and print its director(s)
the_matrix = ia.get_movie('0133093')
for director in the_matrix['directors']:
print(director['name'])
# print the genres of the movie
print(the_matrix['genres'])
# search for a person by name
people = ia.search_person('Keanu Reeves')
for person in people:
print(person.personID, person['name'])
Do you like this project? You can help by:
In this release SQLAlchemy was made an optional dependency: if not installed, you must use SQLite.
We also improved performances, fixed bugs and introduced some small new features.
For more details see the latest changelog.