Registry / data / cinemagoer

cinemagoer

JSON →
library2023.5.1pypypi✓ verified 85d ago

Cinemagoer (previously IMDbPY) is a Python package for accessing and retrieving data from IMDb's database. It scrapes movie, person, character, and company data from IMDb web pages. Version 2023.5.1 is the latest release. The project is now under maintenance mode with occasional fixes.

pip install cinemagoer
INSTALL
IMPORT
SIG · CINEMAGOER
C
cinemagoer
datapythonv2023.5.1
Install
3.8s avg
Import
47ms
Disk
55MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2023.5.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.052s · 56.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.8s · import 0.042s · 54MB
55MB installed
● package 55MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

IMDb
from imdb import Cinemagoer
from imdb import IMDb
Since 2022.1.16, the main access class is Cinemagoer; IMDb is a deprecated alias.

Basic usage: search for movies and retrieve a movie by ID.

from imdb import Cinemagoer # Create an instance of the Cinemagoer class ia = Cinemagoer() # Search for a movie results = ia.search_movie('The Dark Knight') for movie in results: print(movie.movieID, movie['title']) # Get a movie by ID movie = ia.get_movie('0468569') print(movie['title'], movie['year'])
Debug
Known issues
breakingRenamed package: IMDbPY has been renamed to cinemagoer. The old 'IMDb' class is deprecated; use 'Cinemagoer' instead.
fix
Change import from 'from imdb import IMDb' to 'from imdb import Cinemagoer'.
affects: >=2022.1.16
breakingExceptions raised by default: Since 2022.1.16, by default exceptions are raised on errors instead of returning None. Previously, some methods returned None on failure.
fix
Catch IMDbError exceptions or use the 'reraise_exceptions' parameter to control behavior.
affects: >=2022.1.16
gotchaScraping heavy: The library scrapes IMDb's website, which can be slow and may be blocked if too many requests are made. Use caching and respect IMDb's robots.txt.
fix
Implement request throttling and caching to avoid IP bans.
affects: all
gotchaData format changes: IMDb regularly changes its HTML structure, so parsers can break unexpectedly. The library is maintenance-mode, so fixes may be delayed.
fix
Report issues on GitHub and consider using an official IMDb API if available.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'imdb'
The package has been renamed to cinemagoer; installing cinemagoer creates a package named 'imdb'.
fix
Run 'pip install cinemagoer' (not 'pip install imdb'). Then import from 'imdb'.
AttributeError: module 'imdb' has no attribute 'IMDb'
Using old import 'from imdb import IMDb' with cinemagoer >= 2022.1.16; the class was renamed to Cinemagoer.
fix
Use 'from imdb import Cinemagoer' and instantiate with 'ia = Cinemagoer()'.
Upgrade
Version history
2023.5.1latest on PyPI · released May 1, 2023
Audit
Dependencies
lxmlrequiredRequired for HTML parsing of IMDb pages
requestsrequiredRequired for HTTP requests to IMDb
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources