mirror of
https://gitlab.com/dstftw/youtube-dl.git
synced 2020-11-16 09:42:26 +00:00
[rtve] Extract duration
This commit is contained in:
parent
e3216b82bf
commit
f3bff94cf9
|
@ -8,8 +8,9 @@ import time
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..compat import compat_urlparse
|
from ..compat import compat_urlparse
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
struct_unpack,
|
float_or_none,
|
||||||
remove_end,
|
remove_end,
|
||||||
|
struct_unpack,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,6 +68,7 @@ class RTVEALaCartaIE(InfoExtractor):
|
||||||
'id': '2491869',
|
'id': '2491869',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Balonmano - Swiss Cup masculina. Final: España-Suecia',
|
'title': 'Balonmano - Swiss Cup masculina. Final: España-Suecia',
|
||||||
|
'duration': 5024.566,
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
'note': 'Live stream',
|
'note': 'Live stream',
|
||||||
|
@ -113,6 +115,7 @@ class RTVEALaCartaIE(InfoExtractor):
|
||||||
'thumbnail': info.get('image'),
|
'thumbnail': info.get('image'),
|
||||||
'page_url': url,
|
'page_url': url,
|
||||||
'subtitles': subtitles,
|
'subtitles': subtitles,
|
||||||
|
'duration': float_or_none(info.get('duration'), scale=1000),
|
||||||
}
|
}
|
||||||
|
|
||||||
def _get_subtitles(self, video_id, sub_file):
|
def _get_subtitles(self, video_id, sub_file):
|
||||||
|
|
Loading…
Reference in a new issue