1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-30 15:14:14 +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) season = match.group(1)
else: else:
match = self._conentpage(self.get_urldata()) match = self._conentpage(self.get_urldata())
if match: if match: # this only happen on the program page?
print("printa") janson2 = json.loads(match.group(1))
season = janson2["formatPage"]["format"]["seasonNumber"]
return janson2["formatPage"]["format"]["videos"][str(season)]["program"][0]["id"]
return None return None
if "videoIdOrEpisodeNumber" in jansson: if "videoIdOrEpisodeNumber" in jansson:
videp = jansson["videoIdOrEpisodeNumber"] videp = jansson["videoIdOrEpisodeNumber"]