1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-30 23:24:16 +01:00

urplay: in some cases they show schema.

This commit is contained in:
Johan Andersson 2018-01-04 22:17:13 +01:00
parent 3d0886a277
commit e2536eb133

View File

@ -46,7 +46,10 @@ class Urplay(Service, OpenGraphThumbMixin):
if "streamer" in jsondata["streaming_config"]:
basedomain = jsondata["streaming_config"]["streamer"]["redirect"]
else:
lbjson = self.http.request("get", "https:{}".format(jsondata["streaming_config"]["loadbalancer"])).text
url = jsondata["streaming_config"]["loadbalancer"]
if url[:1] == "/":
url = "https:{}".format(url)
lbjson = self.http.request("get", url).text
lbjson = json.loads(lbjson)
basedomain = lbjson["redirect"]
http = "https://{0}/{1}".format(basedomain, jsondata["file_http"])