Skip to content
Projetos

Sobre

Cinemagoer é um pacote Python útil para recuperar e gerenciar dados do banco de dados de filmes IMDb — ao qual não somos afiliados de nenhuma forma — sobre filmes, pessoas e personagens.

Dados e análise

Como estes números são medidos

O que você pode fazer

  • imports IMDb's non-commercial datasets into a local SQL database and queries it offline: no web scraping, no API key
  • SQLite support with no third-party dependencies; PostgreSQL, MariaDB, MySQL and other databases through the optional SQLAlchemy integration
  • search for titles and people, with filters (kind, year, genre, rating, votes, runtime) and sorting; retrieve movies, series, episodes and people
  • a cinemagoer command line tool, with text and JSON output

Crescimento medido de estrelas

em 24 h
0
em 7 dias
0
em 15 dias
+1
em 1 mês
+3

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original

PyPI version. Supported Python versions. Project license.

Cinemagoer (previously known as IMDbPY) is a Python package for retrieving and managing IMDb data about movies, people and companies from IMDb non-commercial downloadable datasets.

This project and its authors are not affiliated in any way to Internet Movie Database Inc.; see the DISCLAIMER.txt file for details about data licenses.

Revamp notice

Starting on April 2026, the scope of this project shifted significantly due to the introduction of a WAF in front of the IMDb website. From that day we can no longer guarantee that the package will work as expected with IMDb data (from a technical and legal standpoints), and we limited the scope of Cinemagoer to the handling of the dataset that is freely distributed by IMDb.

If you still need IMDb web-page parsing, see cinemagoerng. It is focused on parsing IMDb web pages, but requires you to provide the function used to fetch those pages.

Main features

  • imports IMDb's non-commercial datasets into a local SQL database and queries it offline: no web scraping, no API key
  • SQLite support with no third-party dependencies; PostgreSQL, MariaDB, MySQL and other databases through the optional SQLAlchemy integration
  • search for titles and people, with filters (kind, year, genre, rating, votes, runtime) and sorting; retrieve movies, series, episodes and people
  • a cinemagoer command line tool, with text and JSON output
  • written in Python 3, platform-independent, released under the terms of the GPL 2 license

Cinemagoer powers many other software and has been used in various research papers. Curious about that?

Installation

Whenever possible, please use the latest version from the repository:

pip install git+https://github.com/cinemagoer/cinemagoer

But if you want, you can also install the latest release from PyPI:

pip install cinemagoer

This base installation includes native SQLite support. To use PostgreSQL, MariaDB, MySQL, or an explicitly selected SQLAlchemy dialect, install the optional integration and your chosen database driver:

pip install "cinemagoer[sqlalchemy]"

Example

Here's an example that demonstrates how to use Cinemagoer:

Note

Cinemagoer reads data from a local database populated from IMDb datasets. Before running Python examples:

  1. Download the *.tsv.gz files from https://datasets.imdbws.com/ (or run download-from-s3)
  2. Import them with s32cinemagoer.py
  3. Open the populated database with Cinemagoer

SQLite works with a base installation. Any SQLAlchemy-supported database can be used after installing the sqlalchemy extra and its DBAPI driver.

s32cinemagoer.py /path/to/imdb-tsv-files/ sqlite:///cinemagoer.db
from imdb import Cinemagoer

# Open the SQLite database populated with s32cinemagoer.py.
ia = Cinemagoer('s3', uri='sqlite:///cinemagoer.db')

# get a movie
movie = ia.get_movie('0133093')

# print the names of the directors of the movie
print('Directors:')
for director in movie['directors']:
    print(director['name'])

# print the genres of the movie
print('Genres:')
for genre in movie['genres']:
    print(genre)

# search for a person name
people = ia.search_person('Mel Gibson')
for person in people:
    print(person.personID, person['name'])

The same database can be queried from the command line:

cinemagoer --uri sqlite:///cinemagoer.db search movie "the matrix" -n 5
cinemagoer --uri sqlite:///cinemagoer.db get movie tt0133093 --format json

Getting help

Please refer to the support page on the project homepage and to the the online documentation on Read The Docs.

The sources are available on GitHub.

Contribute

Visit the CONTRIBUTOR_GUIDE.rst to learn how you can contribute to the Cinemagoer package.

License

Copyright (C) 2004-2026 Davide Alberani <[email protected]> et al.

Cinemagoer is released under the GPL license, version 2 or later. Read the included LICENSE.txt file for details.

NOTE: For a list of persons who share the copyright over specific portions of code, see the CONTRIBUTORS.txt file.

NOTE: See also the recommendations in the DISCLAIMER.txt file.

Explore projetos relacionados

Carregando…