1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-23 08:26:50 +00:00

[nrk] Extract duration

This commit is contained in:
Sergey M․ 2015-03-21 18:21:19 +06:00
parent 4e6a228689
commit 393d9fc6d2

View File

@ -25,6 +25,7 @@ class NRKIE(InfoExtractor):
'ext': 'flv', 'ext': 'flv',
'title': 'Dompap og andre fugler i Piip-Show', 'title': 'Dompap og andre fugler i Piip-Show',
'description': 'md5:d9261ba34c43b61c812cb6b0269a5c8f', 'description': 'md5:d9261ba34c43b61c812cb6b0269a5c8f',
'duration': 263,
} }
}, },
{ {
@ -35,6 +36,7 @@ class NRKIE(InfoExtractor):
'ext': 'flv', 'ext': 'flv',
'title': 'Slik høres internett ut når du er blind', 'title': 'Slik høres internett ut når du er blind',
'description': 'md5:a621f5cc1bd75c8d5104cb048c6b8568', 'description': 'md5:a621f5cc1bd75c8d5104cb048c6b8568',
'duration': 20,
} }
}, },
] ]
@ -53,6 +55,8 @@ class NRKIE(InfoExtractor):
video_url = data['mediaUrl'] + '?hdcore=3.5.0&plugin=aasp-3.5.0.151.81' video_url = data['mediaUrl'] + '?hdcore=3.5.0&plugin=aasp-3.5.0.151.81'
duration = parse_duration(data.get('duration'))
images = data.get('images') images = data.get('images')
if images: if images:
thumbnails = images['webImages'] thumbnails = images['webImages']
@ -67,6 +71,7 @@ class NRKIE(InfoExtractor):
'ext': 'flv', 'ext': 'flv',
'title': data['title'], 'title': data['title'],
'description': data['description'], 'description': data['description'],
'duration': duration,
'thumbnail': thumbnail, 'thumbnail': thumbnail,
} }