1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 13:44:14 +01:00

viafree: for some reason they send undefined text in json.

This commit is contained in:
Johan Andersson 2021-08-13 12:31:39 +02:00
parent f3db402b82
commit 52d98a8934

View File

@ -49,8 +49,7 @@ class Viafree(Service, OpenGraphThumbMixin):
if not match:
yield ServiceError("Cant find necessary info")
return
janson = json.loads("{}{}".format("{", match.group(1)))
janson = json.loads("{}{}".format("{", match.group(1).replace("undefined", "null")))
video = None
for play in janson["page"]["blocks"]:
if "componentName" in play and play["componentName"] == "player":