flexget.components.imdb.utils module#

class flexget.components.imdb.utils.ImdbParser[source]#

Bases: object

Fetches title details via IMDb GraphQL, with HTML/JSON scrape as fallback.

_parse_from_graphql()[source]#

Populate fields from IMDb’s GraphQL API.

_parse_from_html(soup)[source]#
parse(imdb_id, soup=None)[source]#
class flexget.components.imdb.utils.ImdbSearch[source]#

Bases: object

best_match(name, year=None, single_match=True)[source]#

Return single movie that best matches name criteria or None.

ireplace(text, old, new, count=0)[source]#

Case insensitive string replace.

search(name, year=None)[source]#

Return array of movie details (dict).

smart_match(raw_name, single_match=True)[source]#

Accept messy name, clean it and use information available to make smartest and best match.

flexget.components.imdb.utils.extract_id(url)[source]#

Return IMDb ID of the given URL. Return None if not valid or if URL is not a string.

flexget.components.imdb.utils.is_imdb_url(url)[source]#

Test the url to see if it’s for imdb.com.

flexget.components.imdb.utils.is_valid_imdb_person_id(value)[source]#

Return True if value is a valid IMDB ID for a person.

flexget.components.imdb.utils.is_valid_imdb_title_id(value)[source]#

Return True if value is a valid IMDB ID for titles (movies, series, etc).

flexget.components.imdb.utils.make_url(imdb_id)[source]#

Return IMDb URL of the given ID.