projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa3ae23
)
[youtube] Make duration an integer or None
author
Philipp Hagemeister
<phihag@phihag.de>
Mon, 16 Dec 2013 03:09:05 +0000
(
04:09
+0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Mon, 16 Dec 2013 03:09:05 +0000
(
04:09
+0100)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index 874429b78cc4917ca1cbbec7245c85436dd73783..a68a214cabe5e9f020fa1ee818b31d0943b2b0fb 100644
(file)
--- 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