mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 00:25:06 +00:00
[prosiebensat1] Modernize
This commit is contained in:
parent
61be92e26a
commit
993df6bc22
1 changed files with 2 additions and 1 deletions
|
@ -11,6 +11,7 @@
|
|||
from ..utils import (
|
||||
ExtractorError,
|
||||
determine_ext,
|
||||
float_or_none,
|
||||
int_or_none,
|
||||
unified_strdate,
|
||||
)
|
||||
|
@ -230,7 +231,7 @@ def _extract_clip(self, url, webpage):
|
|||
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))
|
||||
|
||||
|
|
Loading…
Reference in a new issue