upsies.utils.webdbs.imdb

API for imdb.com

Classes

class upsies.utils.webdbs.imdb.ImdbApi(config=None)[source]

Bases: WebDbApiBase

API for imdb.com

get_id_from_text(text)[source]

Return ID found in text or None

sanitize_query(query)[source]

Deal with IMDb-specific quirks

  • Remove "and" from Query.title because IMDb doesn’t find "Foo & Bar" if we search for "Foo and Bar". It seems to work vice versa, i.e. the query "Foo and Bar" finds "Foo & Bar", so we keep any "&".

  • Replace "dont" with "don't", "cant" with "can't", etc.

async search(query)[source]

Search DB

Parameters:

queryQuery instance

Returns:

List of SearchResult instances

async cast(id)[source]

Return list of cast names

async creators(id)[source]

Return list of creator names (usually empty for movies and episodes)

async directors(id)[source]

Return list of director names (usually empty for series)

async languages(id)[source]

Return list of spoken languages

async genres(id)[source]

Return list of genres

async poster_url(id, season=None)[source]

Return URL of poster image or empty string

Parameters:

season

Return poster for specific season

If this is not supported by the concrete implementation, default to the URL for the main poster.

async rating(id)[source]

Return rating as a number or None

async summary(id)[source]

Return short plot description

async type(id)[source]

Return ReleaseType

async url(id)[source]

Return URL for id

async year(id)[source]

Return release year or empty string