projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66fa495
)
[jwplatform:base] Extract duration
author
Sergey M․
<dstftw@gmail.com>
Sun, 10 Apr 2016 16:47:38 +0000
(22:47 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Sun, 10 Apr 2016 16:47:38 +0000
(22:47 +0600)
youtube_dl/extractor/jwplatform.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/jwplatform.py
b/youtube_dl/extractor/jwplatform.py
index 6770685d7027c3738fba35f3e057f6be2a3a512c..01601c59e2ece2d91f12859d1ff25fc8b56e1ca0 100644
(file)
--- 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,
}