aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/francetv.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-04-04 22:52:25 +0600
committerSergey M․ <dstftw@gmail.com>2015-04-04 22:52:25 +0600
commitf05d0e73c6d38d86393f8f552fbfcdda80f37607 (patch)
tree9525815cad0fc48855408534b45651fe41c543e2 /youtube_dl/extractor/francetv.py
parentaed2d4b31e331422fefa304ab3fa49c050ea13e8 (diff)
[francetv] Fix duration
Diffstat (limited to 'youtube_dl/extractor/francetv.py')
-rw-r--r--youtube_dl/extractor/francetv.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/extractor/francetv.py b/youtube_dl/extractor/francetv.py
index 55b8e9d9e..0d92ef9c4 100644
--- a/youtube_dl/extractor/francetv.py
+++ b/youtube_dl/extractor/francetv.py
@@ -14,6 +14,7 @@ from ..utils import (
clean_html,
ExtractorError,
int_or_none,
+ float_or_none,
parse_duration,
)
@@ -86,7 +87,7 @@ class FranceTVBaseInfoExtractor(InfoExtractor):
'title': info['titre'],
'description': clean_html(info['synopsis']),
'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']),
'formats': formats,
}