mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
aftonbladet: support for akamai streams.
This commit is contained in:
parent
9aeea1b9d0
commit
eb21340039
@ -35,10 +35,17 @@ class Aftonbladet(Service):
|
||||
|
||||
streamsurl = "http://aftonbladet-play-static-ext.cdn.drvideo.aptoma.no/actions/video/?id=%s&formats&callback=" % videoId
|
||||
streams = json.loads(get_http_data(streamsurl))
|
||||
hls = streams["formats"]["hls"]["level3"]["csmil"][0]
|
||||
hlsstreams = streams["formats"]["hls"]
|
||||
if "level3" in hlsstreams.keys():
|
||||
hls = hlsstreams["level3"]["csmil"][0]
|
||||
else:
|
||||
hls = hlsstreams["akamai"]["m3u8"][0]
|
||||
address = hls["address"]
|
||||
path = hls["path"]
|
||||
|
||||
for i in hls["files"]:
|
||||
playlist = "http://%s/%s/%s/master.m3u8" % (address, path, i["filename"])
|
||||
yield HLS(copy.copy(options), playlist, i["bitrate"])
|
||||
if "filename" in i.keys():
|
||||
playlist = "http://%s/%s/%s/master.m3u8" % (address, path, i["filename"])
|
||||
else:
|
||||
playlist = "http://%s/%s/%s/master.m3u8" % (address, path, hls["filename"])
|
||||
yield HLS(copy.copy(options), playlist, i["bitrate"])
|
||||
|
Loading…
Reference in New Issue
Block a user