mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 09:07:58 +01:00
[youtube] Make duration an integer or None
This commit is contained in:
parent
fa3ae234e0
commit
b466b7029d
1 changed files with 2 additions and 2 deletions
|
@ -1377,9 +1377,9 @@ def _extract_count(klass):
|
|||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue