mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-26 05:05:54 +01:00
[francetv] Fix duration
This commit is contained in:
parent
aed2d4b31e
commit
f05d0e73c6
@ -14,6 +14,7 @@
|
|||||||
clean_html,
|
clean_html,
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
|
float_or_none,
|
||||||
parse_duration,
|
parse_duration,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -86,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': parse_duration(info['duree']),
|
'duration': float_or_none(info.get('real_duration'), 1000) or parse_duration(info['duree']),
|
||||||
'timestamp': int_or_none(info['diffusion']['timestamp']),
|
'timestamp': int_or_none(info['diffusion']['timestamp']),
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user