Registry / data / guessit

guessit

JSON →
library3.8.0pypypi✓ verified 83d ago

GuessIt is a Python library and command-line tool that extracts metadata (title, season, episode, year, quality, etc.) from video filenames using a flexible set of rules and regexes. Version 3.8.0 is current. It sees regular maintenance but no fixed release cadence.

pip install guessit
INSTALL
IMPORT
SIG · GUESSIT
G
guessit
datapythonv3.8.0
Install
1.9s avg
Import
297ms
Disk
19MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.8.0 · 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.304s · 21MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.9s · import 0.290s · 21MB
19MB installed
● package 19MB
Code
Verified usage

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

guessit
import guessit
The main API is a single function import.
guessit.guessit
from guessit import guessit
import guessit; guessit.guessit()
Direct import of the function is cleaner.

Extract metadata from a single filename.

from guessit import guessit result = guessit('The.Shawshank.Redemption.1994.1080p.BluRay.x264.mkv') print(result) # {"title": "The Shawshank Redemption", "year": 1994, "screen_size": "1080p", "source": "BluRay", "video_codec": "x264", "container": "mkv"}
guessit --version
Debug
Known issues
gotchaguessit returns a dictionary-like object (Guess) that is case-insensitive for keys. Accessing 'title' and 'TITLE' both work.
fix
Rely on lower-case keys for consistency, but be aware of case-insensitivity.
affects: all
gotchaThe command-line usage changed: from guessit v3, the CLI is invoked as 'guessit' (no hyphen). The old 'guessit' script (with hyphen) from v2 is removed.
fix
Use 'guessit' (not 'guess-it') on the command line.
affects: >=3.0.0
deprecatedThe 'guessit' library deprecated the 'output' parameter in the API; use 'options' instead.
fix
Replace result = guessit(filename, output='json') with result = guessit(filename, options={'output_format': 'json'}).
affects: >=3.5.0
Errors
Common errors & fixes
ImportError: cannot import name 'guessit'
Installed old version or different package; correct import is from guessit import guessit.
fix
Run 'pip install guessit' and import with 'from guessit import guessit'.
KeyError: 'title'
In some cases, guessit may not find a title (e.g., noise-only filenames). The returned dict might lack expected keys.
fix
Always use .get('title', 'unknown') or check key existence.
TypeError: guessit() got multiple values for keyword argument 'output'
Passing deprecated 'output' parameter in newer versions.
fix
Use options={'output_format': 'json'} instead of output='json'.
Upgrade
Version history
3.8.0latest on PyPI · released Dec 14, 2023
Audit
Dependencies
python-dateutiloptionalParsing date patterns in filenames
PyYAMLoptionalLoading custom rules from YAML files
babelfishoptionalLanguage and country detection
Agent activity
10 hits · last 30 days
node
10
Resources
guessit — pip install guessit · libregistry