1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-12-31 02:52:51 +08:00

[youtube] Make duration an integer or None

This commit is contained in:
Philipp Hagemeister 2013-12-16 04:09:05 +01:00
parent fa3ae234e0
commit b466b7029d

View File

@ -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