1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-26 04:02:11 +00:00

[prosiebensat1] Modernize

This commit is contained in:
Sergey M․ 2015-07-23 03:05:16 +06:00
parent 61be92e26a
commit 993df6bc22

View file

@ -11,6 +11,7 @@ from ..compat import (
from ..utils import (
ExtractorError,
determine_ext,
float_or_none,
int_or_none,
unified_strdate,
)
@ -230,7 +231,7 @@ class ProSiebenSat1IE(InfoExtractor):
if video.get('is_protected') is True:
raise ExtractorError('This video is DRM protected.', expected=True)
duration = float(video['duration'])
duration = float_or_none(video.get('duration'))
source_ids = [source['id'] for source in video['sources']]
source_ids_str = ','.join(map(str, source_ids))