diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-03-18 03:25:20 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-03-18 03:25:47 +0530 |
commit | 16c620bc55c762781ab579ed21e24df6937db63f (patch) | |
tree | 459edde03763f0d3fd5e82a9db1c889c9db824b2 | |
parent | 5a373d97686ae3876ba42f102cf3163f3680a1e4 (diff) | |
download | hypervideo-pre-16c620bc55c762781ab579ed21e24df6937db63f.tar.lz hypervideo-pre-16c620bc55c762781ab579ed21e24df6937db63f.tar.xz hypervideo-pre-16c620bc55c762781ab579ed21e24df6937db63f.zip |
Handle float in `--wait-for-video`
Closes #3082
-rw-r--r-- | yt_dlp/YoutubeDL.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index d6b284529..38ff628b0 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -1428,7 +1428,7 @@ class YoutubeDL(object): min_wait, max_wait = self.params.get('wait_for_video') diff = try_get(ie_result, lambda x: x['release_timestamp'] - time.time()) if diff is None and ie_result.get('live_status') == 'is_upcoming': - diff = random.randrange(min_wait, max_wait) if (max_wait and min_wait) else (max_wait or min_wait) + diff = round(random.uniform(min_wait, max_wait) if (max_wait and min_wait) else (max_wait or min_wait), 0) self.report_warning('Release time of video is not known') elif (diff or 0) <= 0: self.report_warning('Video should already be available according to extracted info') |