pymdb.models.name module

The classes used to represent various information about persons 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.

NameBasics

class pymdb.models.name.NameBasics(name_id, primary_name, birth_year, death_year, primary_professions, known_for_titles)

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

Parameters:
  • name_id (str) – The person’s ID used by IMDb prefixed with nm.
  • primary_name (str) – The person’s name.
  • birth_year (int) – The person’s birth year.
  • death_year (int) – The person’s death year, or None otherwise.
  • primary_professions (list of str) – A list of all the person’s primary professions.
  • known_for_titles (list of str) – A list of title IDs for each title the person is known for.

NameScrape

class pymdb.models.name.NameScrape(name_id, display_name, known_for_titles, birth_name, birth_date, birth_city, death_date, death_city, death_cause, nicknames, height)

Specific information on a person scraped from IMDb.

This information is taken from IMDb’s bio web page on a person to find detailed information.

Parameters:
  • name_id (str) – The person’s ID used by IMDb prefixed with nm.
  • display_name (str) – The name IMDb lists the person having currently. Usually how they are well known or credited.
  • known_for_titles (list of str) – A list of title IDs for each title the person is known for.
  • birth_name (str) – The name IMDb lists the person born as.
  • birth_date (datetime) – The date the person was born.
  • birth_city (str) – The city the person was born in.
  • death_date (datetime) – The date the person died, or None otherwise.
  • death_city (str) – The city the person died in, or None otherwise.
  • death_cause (str) – The person’s cause of death, or None otherwise.
  • nicknames (list of str) – All of the person’s nicknames.
  • height (float) – How tall the person is in meters.

NameCreditScrape

class pymdb.models.name.NameCreditScrape(name_id, title_id, category, start_year, end_year, role, title_notes)

Stores credit information from a person’s full filmography on IMDb.

This information is taken from IMDb’s full filmography section of a person’s personal web page.

Parameters:
  • name_id (str) – The person’s ID used by IMDb prefixed with nm.
  • title_id (str) – The titles’s ID used by IMDb prefixed with tt.
  • category (str) – The category this credit is listed under in the filmography section.
  • start_year (int) – The year the title released, or the starting year they were credited for on a TV series.
  • end_year (int) – The year the person stopped being credited on a TV series, or None otherwise.
  • role (str) – A string of the role the person is credited for the title, such as character.
  • title_notes (list of str) – A list of further notes for a person’s credit on a title.

CreditScrape

class pymdb.models.name.CreditScrape(name_id, title_id, job_title, credit, episode_count, episode_year_start, episode_year_end)

Object to represent information for each person scraped from IMDb’s fullcredits page for a title.

This information is scraped from the fullcredits IMDb web page, and will either represent an actor or another crew member.

Parameters:
  • name_id (str) – The person’s ID used by IMDb prefixed with nm.
  • title_id (str) – The title’s ID used by IMDb prefixed with tt.
  • job_title (str) – The job title the person is credited for on the title.
  • credit (str) – Further credits for the person on the title.
  • episode_count (int) – How many episodes the person is credited for if a TV series, otherwise None.
  • episode_year_start (int) – The year the person began being credited in the title if the title is a TV series, otherwise None.
  • episode_year_end (int) – The year the person stopped being credited in the title if the title is a TV series, otherwise None.