1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-23 19:55:38 +01:00

viafree: support for downloading video from the program page.

This commit is contained in:
Johan Andersson 2018-06-03 18:00:01 +02:00
parent 585ea7b0d6
commit 18b00ae673

View File

@ -58,8 +58,10 @@ class Viaplay(Service, OpenGraphThumbMixin):
season = match.group(1)
else:
match = self._conentpage(self.get_urldata())
if match:
print("printa")
if match: # this only happen on the program page?
janson2 = json.loads(match.group(1))
season = janson2["formatPage"]["format"]["seasonNumber"]
return janson2["formatPage"]["format"]["videos"][str(season)]["program"][0]["id"]
return None
if "videoIdOrEpisodeNumber" in jansson:
videp = jansson["videoIdOrEpisodeNumber"]