commit: b466b7029d0af24dc06ecd8bc1f147a39be91c62
parent fa3ae234e04f631a0754b6b474417ddffc2faee2
Author: Philipp Hagemeister <phihag@phihag.de>
Date: Mon, 16 Dec 2013 04:09:05 +0100
[youtube] Make duration an integer or None
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
@@ -1377,9 +1377,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
if 'length_seconds' not in video_info:
self._downloader.report_warning(u'unable to extract video duration')
- video_duration = ''
+ video_duration = None
else:
- video_duration = compat_urllib_parse.unquote_plus(video_info['length_seconds'][0])
+ video_duration = int(compat_urllib_parse.unquote_plus(video_info['length_seconds'][0]))
# annotations
video_annotations = None