aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-04-10 22:47:38 +0600
committerSergey M․ <dstftw@gmail.com>2016-04-10 22:47:38 +0600
commita6d6722c8fc2174ce72ed462e649d397d1448a0a (patch)
tree3da19e3c34bb929afae45fa0122b8b8068738a26 /youtube_dl
parent66fa49586879418e357337ff82794fe851e71e7e (diff)
[jwplatform:base] Extract duration
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/jwplatform.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube_dl/extractor/jwplatform.py b/youtube_dl/extractor/jwplatform.py
index 6770685d7..01601c59e 100644
--- a/youtube_dl/extractor/jwplatform.py
+++ b/youtube_dl/extractor/jwplatform.py
@@ -4,7 +4,10 @@ from __future__ import unicode_literals
import re
from .common import InfoExtractor
-from ..utils import int_or_none
+from ..utils import (
+ float_or_none,
+ int_or_none,
+)
class JWPlatformBaseIE(InfoExtractor):
@@ -41,6 +44,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')),
'subtitles': subtitles,
'formats': formats,
}