pymdb.models.search module¶
The classes used to represent search results on IMDb.
This information is gathered from the JSON responses IMDb uses for various GET requests for their search results.
SearchResult¶
-
class
pymdb.models.search.
SearchResult
(imdb_id, search_rank)¶ The base search result class.
Contains the basic search result information both SearchResultName and SearchResultTitle use.
Parameters: - imdb_id (
str
) – The ID used by IMDb. Prefixed with nm for names and tt for titles. - search_rank (
int
) – The ranking of the result by IMDb.
- imdb_id (
SearchResultName¶
-
class
pymdb.models.search.
SearchResultName
(imdb_id, search_rank, name, known_for)¶ Search result for a person within IMDb.
Contains the rest of the information IMDb provides within a search result when the ID is for a person.
Parameters: - imdb_id (
str
) – The ID used by IMDb prefixed with nm. - search_rank (
int
) – The ranking of the result by IMDb. - name (
str
) – The name of the person. - known_for (
str
) – The blurb IMDb provides for what the person is known for to build the search results.
- imdb_id (
SearchResultTitle¶
-
class
pymdb.models.search.
SearchResultTitle
(imdb_id, search_rank, display_title, title_type, starring, start_year, end_year)¶ Search result for a title within IMDb.
Contains the rest of the information IMDb provides within a search result when the ID is for a title. Note: If the title_type is a “video game”, the starring list will be empty as IMDb provides the title’s genres in its place.
Parameters: - imdb_id (
str
) – The ID used by IMDb prefixed with tt. - search_rank (
int
) – The ranking of the result by IMDb. - display_title (
str
) – The title used by IMDb within search results. - title_type (
str
) – The type of title (ex: TV series, feature, etc). - starring (
list
ofstr
) – A list of two actor names that are known for starring in the film. - start_year (
int
) – The year the title was released, or the start year if a TV series. - end_year (
int
) – The year a TV series was ended, or None if the series has not ended or is not a TV series.
- imdb_id (