0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-23 02:25:11 +00:00

[francetv] Fix duration extraction

This commit is contained in:
Sergey M․ 2015-07-18 22:43:42 +06:00
parent 3f5c6d0c1b
commit 5705ee6ef8

View file

@ -87,7 +87,7 @@ def _extract_video(self, video_id, catalogue):
'title': info['titre'], 'title': info['titre'],
'description': clean_html(info['synopsis']), 'description': clean_html(info['synopsis']),
'thumbnail': compat_urlparse.urljoin('http://pluzz.francetv.fr', info['image']), 'thumbnail': compat_urlparse.urljoin('http://pluzz.francetv.fr', info['image']),
'duration': float_or_none(info.get('real_duration'), 1000) or parse_duration(info['duree']), 'duration': int_or_none(info.get('real_duration')) or parse_duration(info['duree']),
'timestamp': int_or_none(info['diffusion']['timestamp']), 'timestamp': int_or_none(info['diffusion']['timestamp']),
'formats': formats, 'formats': formats,
} }
@ -250,6 +250,7 @@ class FranceTVIE(FranceTVBaseInfoExtractor):
'description': 'md5:', 'description': 'md5:',
'upload_date': '20150226', 'upload_date': '20150226',
'timestamp': 1424989860, 'timestamp': 1424989860,
'duration': 5400,
}, },
}, },
{ {