Compare commits

...

2 Commits

Author SHA1 Message Date
pukkandan
e4b98809cf
[youtube] Fix pagination of membership tab 2022-03-18 05:23:51 +05:30
pukkandan
16c620bc55
Handle float in --wait-for-video
Closes #3082
2022-03-18 03:25:47 +05:30
2 changed files with 2 additions and 1 deletions

View File

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

View File

@ -4026,6 +4026,7 @@ class YoutubeTabBaseInfoExtractor(YoutubeBaseInfoExtractor):
continue
known_renderers = {
'videoRenderer': (self._grid_entries, 'items'), # for membership tab
'gridPlaylistRenderer': (self._grid_entries, 'items'),
'gridVideoRenderer': (self._grid_entries, 'items'),
'gridChannelRenderer': (self._grid_entries, 'items'),