aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-12-16 04:09:05 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-12-16 04:09:05 +0100
commitb466b7029d0af24dc06ecd8bc1f147a39be91c62 (patch)
tree496d4335ff7e93c9654de73bafd8a26e141db6cc /youtube_dl/extractor
parentfa3ae234e04f631a0754b6b474417ddffc2faee2 (diff)
downloadyoutube-dl-b466b7029d0af24dc06ecd8bc1f147a39be91c62.zip
youtube-dl-b466b7029d0af24dc06ecd8bc1f147a39be91c62.tar.gz
youtube-dl-b466b7029d0af24dc06ecd8bc1f147a39be91c62.tar.bz2
[youtube] Make duration an integer or None
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/youtube.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 874429b..a68a214 100644
--- 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