mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
nrk: remove obsolete options.hls
This commit is contained in:
parent
3f4bdd58d8
commit
6d6760df18
@ -4,6 +4,7 @@ from __future__ import absolute_import
|
|||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
|
import copy
|
||||||
|
|
||||||
from svtplay_dl.service import Service, OpenGraphThumbMixin
|
from svtplay_dl.service import Service, OpenGraphThumbMixin
|
||||||
from svtplay_dl.utils import get_http_data
|
from svtplay_dl.utils import get_http_data
|
||||||
@ -40,13 +41,13 @@ class Nrk(Service, OpenGraphThumbMixin):
|
|||||||
data = json.loads(get_http_data(dataurl))
|
data = json.loads(get_http_data(dataurl))
|
||||||
manifest_url = data["mediaUrl"]
|
manifest_url = data["mediaUrl"]
|
||||||
options.live = data["isLive"]
|
options.live = data["isLive"]
|
||||||
if options.hls:
|
|
||||||
manifest_url = manifest_url.replace("/z/", "/i/").replace("manifest.f4m", "master.m3u8")
|
hlsurl = manifest_url.replace("/z/", "/i/").replace("manifest.f4m", "master.m3u8")
|
||||||
streams = hlsparse(manifest_url)
|
streams = hlsparse(hlsurl)
|
||||||
for n in list(streams.keys()):
|
for n in list(streams.keys()):
|
||||||
yield HLS(copy.copy(options), streams[n], n)
|
yield HLS(copy.copy(options), streams[n], n)
|
||||||
else:
|
|
||||||
manifest_url = "%s?hdcore=2.8.0&g=hejsan" % manifest_url
|
manifest_url = "%s?hdcore=2.8.0&g=hejsan" % manifest_url
|
||||||
streams = hdsparse(copy.copy(options), manifest_url)
|
streams = hdsparse(copy.copy(options), manifest_url)
|
||||||
for n in list(streams.keys()):
|
for n in list(streams.keys()):
|
||||||
yield streams[n]
|
yield streams[n]
|
||||||
|
Loading…
Reference in New Issue
Block a user