From: Sergey M․ Date: Sat, 17 Dec 2016 11:45:53 +0000 (+0700) Subject: [jwplatform] Improve duration extraction X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=732d116aa7bed0940bec29af67dd271e47932818;p=youtube-dl [jwplatform] Improve duration extraction --- diff --git a/youtube_dl/extractor/jwplatform.py b/youtube_dl/extractor/jwplatform.py index 7037763cb..aff7ab49a 100644 --- a/youtube_dl/extractor/jwplatform.py +++ b/youtube_dl/extractor/jwplatform.py @@ -126,7 +126,7 @@ class JWPlatformBaseIE(InfoExtractor): 'description': video_data.get('description'), 'thumbnail': self._proto_relative_url(video_data.get('image')), 'timestamp': int_or_none(video_data.get('pubdate')), - 'duration': float_or_none(jwplayer_data.get('duration')), + 'duration': float_or_none(jwplayer_data.get('duration') or video_data.get('duration')), 'subtitles': subtitles, 'formats': formats, })