pymdb.models.title module

The classes used to represent various information about titles on IMDb.

This will contain classes for both information gathered from the datasets provided by IMDb and information scraped from IMDb web pages. Class names ending with “Scrape” are scraped from the web pages. Otherwise, they are gathered from the datasets.

TitleAkas

class pymdb.models.title.TitleAkas(title_id, ordering, localized_title, region, language, types, attributes, is_original_title)

Class to store the row information from IMDb’s “title.akas.tsv” dataset.

Provides additional information for a title.

Parameters:
  • title_id (str) – The title’s ID used by IMDb prefixed with tt.
  • ordering (int) – Uniquely identifies the row for a given title_id.
  • localized_title (str) – The localized title for this version.
  • region (str) – The region for this version of the title.
  • language (str) – The language of this title.
  • types (list of str) – A list of the different types attributed to this title.
  • attributes (list of str) – A list of terms to describe this title.
  • is_original_title (bool) – Determines if this version is the original title.

TitleBasics

class pymdb.models.title.TitleBasics(title_id, title_type, primary_title, original_title, is_adult, start_year, end_year, runtime, genres)

Class to store the row information from IMDb’s “title.basics.tsv” dataset.

Basic information for a title.

Parameters:
  • title_id (str) – The title’s ID used by IMDb prefixed with tt.
  • title_type (str) – The type/format of the title (ex: movie, short, tvseries, tvepisode, video, etc).
  • primary_title (str) – The popular title used for this title.
  • original_title (str) – The original title in the original langauge.
  • is_adult (bool) – Determines if this is an adult title.
  • start_year (int) – The year this title was released or the year the series started.
  • end_year (int) – The year this TV series ended, otherwise None.
  • runtime (int) – The length of the title’s runtime in minutes.
  • genres (list of str) – A list of up to three genres associated with this title.

TitleCrew

class pymdb.models.title.TitleCrew(title_id, director_ids, writer_ids)

Class to store the row information from IMDb’s “title.crew.tsv” dataset.

Director(s) and writer(s) for a title.

Parameters:
  • title_id (str) – The title’s ID used by IMDb prefixed with tt.
  • director_ids (list of str) – A list of IDs used by IMDb for people, prefixed with nm, representing the director(s) of the title.
  • writer_ids (list of str) – A list of IDs used by IMDb for people, prefixed with nm, representing the writer(s) of the title.

TitleEpisode

class pymdb.models.title.TitleEpisode(title_id, parent_title_id, season_number, episode_number)

Class to store the row information from IMDb’s “title.episodes.tsv” dataset.

Parameters:
  • title_id (str) – The title’s ID used by IMDb prefixed with tt.
  • parent_title_id (str) – The title’s ID used by IMDb prefixed with tt. Represents the parent TV series to the episode.
  • season_number (int) – The season this episode was aired in.
  • episode_number (int) – The episode number it was aired as in the season.

TitlePrincipalCrew

class pymdb.models.title.TitlePrincipalCrew(title_id, ordering, name_id, category, job, characters)

Class to store the row information from IMDb’s “title.principals.tsv” dataset.

Principal cast/crew for a title.

Parameters:
  • title_id (str) – The title’s ID used by IMDb prefixed with tt.
  • ordering (int) – Uniquely identifies the row for a given title_id.
  • name_id (str) – The person’s ID used by IMDb prefixed with nm.
  • category (str) – The category of job the person was in.
  • job (str) – The specific job title if available, otherwise None.
  • characters (list of str) – A list of characters the person played, if applicable.

TitleRating

class pymdb.models.title.TitleRating(title_id, average_rating, num_votes)

Class to store the row information from IMDb’s “title.ratings.tsv” dataset.

Parameters:
  • title_id (str) – The title’s ID used by IMDb prefixed with tt.
  • average_rating (float) – The weighted average of all user ratings on IMDb.
  • num_votes (int) – The total number of user votes the title has received on IMDb.

TitleScrape

class pymdb.models.title.TitleScrape(title_id, display_title, title_parent_id, mpaa_rating, country, language, release_date, end_year, season_number, episode_number, taglines, plot, storyline, production_companies, top_cast, budget, budget_denomination, opening_weekend_gross, opening_weekend_date, usa_gross, worldwide_gross)

Object to represent detailed information for a title on its IMDb web page.

This information is scraped from the main page for a title’s IMDb web page.

Parameters:
  • title_id (str) – The title’s ID used by IMDb prefixed with tt.
  • display_title (str) – The title’s name on its IMDb page.
  • title_parent_id (str) – The episode’s TV series parent ID used by IMDb prefixed with tt, otherwise None.
  • mpaa_rating (str) – The title’s MPAA rating.
  • country (str) – The title’s country of origin.
  • language (str) – The title’s original language.
  • release_date (datetime) – The title’s original release date, or when the TV series began airing.
  • end_year (int) – The year the TV series stopped airing, otherwise None.
  • season_number (int) – The season number the episode is in, otherwise None.
  • episode_number (int) – The episode’s number in the season, otherwise None.
  • taglines (list of str) – A list of all of the title’s taglines.
  • plot (str) – The title’s plot.
  • storyline (str) – The title’s storyline.
  • production_companies (list of str) – A list of company IDs, used by IMDb and prefixed with co, that are credited with producing the title.
  • top_cast (list of CreditScrape) – A list of CreditScrape objects that are the top cast in the title.
  • budget (int) – The estimated budget for the title.
  • budget_denomination (str) – The denomination the budget value is listed as
  • opening_weekend_gross (int) – The title’s gross in USD on its opening weekend.
  • opening_weekend_date (datetime) – The title’s opening weekend date.
  • usa_gross (int) – The title’s gross in the USA in USD.
  • worldwide_gross (int) – The title’s gross worldwide in USD.

TitleTechSpecsScrape

class pymdb.models.title.TitleTechSpecsScrape(title_id, runtime, sound_mix, color, aspect_ratio, camera, laboratory, negative_format, cinematographic_process, printed_film_format)

Object to represent information for a title’s technical specifications.

This information is scraped from the technical IMDb web page for a title.

Parameters:
  • title_id (str) – The title’s ID used by IMDb prefixed with tt.
  • runtime (int) – The length of the title’s runtime in minutes.
  • sound_mix (list of str) – A list of the title’s sound mixes.
  • color (str) – The color used in the title.
  • aspect_ratio (list of str) – A list of each aspect ratio the title is available in.
  • camera (list of str) – A list of the cameras used in the title.
  • laboratory (list of str) – A list of all the title’s laboratories.
  • negative_format (str) – The title’s negative format.
  • cinematographic_process (list of str) – A list of each of the title’s cinematographic processes.
  • printed_film_format (str) – The title’s printed film format.