mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
viafree: we should check if this is a sport page or not
This commit is contained in:
parent
138995925e
commit
e3939a4bbe
@ -60,8 +60,9 @@ class Viaplay(Service, OpenGraphThumbMixin):
|
||||
match = self._conentpage(self.get_urldata())
|
||||
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"]
|
||||
if janson2["formatPage"]["format"]:
|
||||
season = janson2["formatPage"]["format"]["seasonNumber"]
|
||||
return janson2["formatPage"]["format"]["videos"][str(season)]["program"][0]["id"]
|
||||
return None
|
||||
if "videoIdOrEpisodeNumber" in jansson:
|
||||
videp = jansson["videoIdOrEpisodeNumber"]
|
||||
@ -203,7 +204,7 @@ class Viaplay(Service, OpenGraphThumbMixin):
|
||||
match = self._conentpage(self.get_urldata())
|
||||
if match:
|
||||
janson = json.loads(match.group(1))
|
||||
for i in janson["format"]["seasons"]:
|
||||
for i in janson["formatPage"]["format"]["seasons"]:
|
||||
seasons.append(i["seasonNumber"])
|
||||
|
||||
episodes = self._grab_episodes(config, seasons)
|
||||
|
Loading…
Reference in New Issue
Block a user