]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[jwplatform] Improve duration extraction
authorSergey M․ <dstftw@gmail.com>
Sat, 17 Dec 2016 11:45:53 +0000 (18:45 +0700)
committerSergey M․ <dstftw@gmail.com>
Sat, 17 Dec 2016 11:50:07 +0000 (18:50 +0700)
youtube_dl/extractor/jwplatform.py

index 7037763cba308ae9b3090d5d882ebd7e82171148..aff7ab49a9500c8bdabe78fac393eb30ef827db5 100644 (file)
@@ -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,
             })