1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 12:15:40 +01:00

Merge pull request #50 from perheld/perka-make-dr-work

BUG: make dr.dk work again
This commit is contained in:
Johan Andersson 2013-09-14 12:57:35 -07:00
commit 7ca28feea5

View File

@ -18,14 +18,11 @@ class Dr(Service):
resource_url = match.group(1)
resource_data = get_http_data(resource_url)
resource = json.loads(resource_data)
streams = {}
for stream in resource['links']:
streams[stream['bitrateKbps']] = stream['uri']
if len(streams) == 1:
uri = streams[list(streams.keys())[0]]
else:
uri = select_quality(options, streams)
# need -v ?
options.other = "-v -y '" + uri.replace("rtmp://vod.dr.dk/cms/", "") + "'"
tempresource = resource['Data'][0]['Assets']
# To find the VideoResource, they have Images as well
for resources in tempresource:
if resources['Kind'] == 'VideoResource':
uri = resources['Links'][0]['Uri']
options.other = ""
download_rtmp(options, uri)