1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-30 15:14: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: if not match:
yield ServiceError("Cant find necessary info") yield ServiceError("Cant find necessary info")
return return
janson = json.loads("{}{}".format("{", match.group(1).replace("undefined", "null")))
janson = json.loads("{}{}".format("{", match.group(1)))
video = None video = None
for play in janson["page"]["blocks"]: for play in janson["page"]["blocks"]:
if "componentName" in play and play["componentName"] == "player": if "componentName" in play and play["componentName"] == "player":