File tree Expand file tree Collapse file tree
src/simplejustwatchpythonapi Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from typing import NamedTuple
22
3+ _DETAILS_URL = "https://justwatch.com"
34_IMAGES_URL = "https://images.justwatch.com"
45
56
@@ -50,13 +51,13 @@ def _parse_entry(json: any) -> MediaEntry:
5051 object_type = json .get ("objectType" )
5152 content = json ["content" ]
5253 title = content .get ("title" )
53- url = _IMAGES_URL + content .get ("fullPath" )
54+ url = _DETAILS_URL + content .get ("fullPath" )
5455 year = content .get ("originalReleaseYear" )
5556 date = content .get ("originalReleaseDate" )
5657 genres = [node .get ("shortName" ) for node in content .get ("genres" , []) if node ]
5758 external_ids = content .get ("externalIds" )
5859 imdb_id = external_ids .get ("imdbId" ) if external_ids else None
59- poster = content .get ("posterUrl" )
60+ poster = _IMAGES_URL + content .get ("posterUrl" )
6061 backdrops = [_IMAGES_URL + bd .get ("backdropUrl" ) for bd in content .get ("backdrops" , []) if bd ]
6162 offers = [_parse_offer (offer ) for offer in json .get ("offers" , []) if offer ]
6263 return MediaEntry (
You can’t perform that action at this time.
0 commit comments