Metacritic#
Usage#
To access Metacritic data points, first ensure you have loaded the Metacritic source through:
await phylm.load_source("mtc")
Alternatively you can instantiate the Metacritic source class directly through:
from phylm.sources import Mtc
mtc = Mtc(raw_title="The Matrix", raw_year=1999) # raw_year is optional
await mtc.load_source()
Reference#
- class phylm.sources.mtc.Mtc(raw_title, raw_year=None)#
Class to abstract a Metacritic movie search result.
- Parameters:
raw_title (str) –
raw_year (int | None) –
- async load_source(session=None)#
Asynchronously load the data from the source.
- Parameters:
session (ClientSession | None) – an optional instance of aiohttp.ClientSession in which to run the request
- Return type:
None
- property rating: str | None#
Return the rating.
- Returns:
the mtc rating
- property title: str | None#
Return the title.
- Returns:
the title of the movie
- property year: int | None#
Return the year.
- Returns:
the year of the movie