Browse Source

[prosiebensat1] Modernize

totalwebcasting
Sergey M․ 10 years ago
parent
commit
993df6bc22
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      youtube_dl/extractor/prosiebensat1.py

+ 2
- 1
youtube_dl/extractor/prosiebensat1.py View File

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


Loading…
Cancel
Save