aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2015-02-27 12:24:51 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2015-02-27 12:24:51 +0100
commitf3bff94cf96587462baa8da6d7e5f17801381753 (patch)
treec7ff4dd3c9c899e672548881a798d6018eeb4668 /youtube_dl/extractor
parente3216b82bf6ef54db63984f7fece4e95fbc3b981 (diff)
[rtve] Extract duration
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/rtve.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/extractor/rtve.py b/youtube_dl/extractor/rtve.py
index c0fd23ff1..b42442d12 100644
--- a/youtube_dl/extractor/rtve.py
+++ b/youtube_dl/extractor/rtve.py
@@ -8,8 +8,9 @@ import time
from .common import InfoExtractor
from ..compat import compat_urlparse
from ..utils import (
- struct_unpack,
+ float_or_none,
remove_end,
+ struct_unpack,
)
@@ -67,6 +68,7 @@ class RTVEALaCartaIE(InfoExtractor):
'id': '2491869',
'ext': 'mp4',
'title': 'Balonmano - Swiss Cup masculina. Final: España-Suecia',
+ 'duration': 5024.566,
},
}, {
'note': 'Live stream',
@@ -113,6 +115,7 @@ class RTVEALaCartaIE(InfoExtractor):
'thumbnail': info.get('image'),
'page_url': url,
'subtitles': subtitles,
+ 'duration': float_or_none(info.get('duration'), scale=1000),
}
def _get_subtitles(self, video_id, sub_file):