diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-11-29 00:27:44 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-11-29 22:52:01 +0530 |
commit | f2ebc5c7be57ef41d3fd5508e75c5ca26d36a0d1 (patch) | |
tree | 812ad33dc62a01467affba1ed45bdee195d426a9 /yt_dlp/extractor/common.py | |
parent | b222c27145a456eef4ed82a8dbbf92cb96fa8041 (diff) | |
download | hypervideo-pre-f2ebc5c7be57ef41d3fd5508e75c5ca26d36a0d1.tar.lz hypervideo-pre-f2ebc5c7be57ef41d3fd5508e75c5ca26d36a0d1.tar.xz hypervideo-pre-f2ebc5c7be57ef41d3fd5508e75c5ca26d36a0d1.zip |
Option `--wait-for-video` to wait for scheduled streams
Diffstat (limited to 'yt_dlp/extractor/common.py')
-rw-r--r-- | yt_dlp/extractor/common.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index fc28bca2e..49c454d39 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -1079,7 +1079,8 @@ class InfoExtractor(object): def raise_login_required( self, msg='This video is only available for registered users', metadata_available=False, method='any'): - if metadata_available and self.get_param('ignore_no_formats_error'): + if metadata_available and ( + self.get_param('ignore_no_formats_error') or self.get_param('wait_for_video')): self.report_warning(msg) if method is not None: msg = '%s. %s' % (msg, self._LOGIN_HINTS[method]) @@ -1088,13 +1089,15 @@ class InfoExtractor(object): def raise_geo_restricted( self, msg='This video is not available from your location due to geo restriction', countries=None, metadata_available=False): - if metadata_available and self.get_param('ignore_no_formats_error'): + if metadata_available and ( + self.get_param('ignore_no_formats_error') or self.get_param('wait_for_video')): self.report_warning(msg) else: raise GeoRestrictedError(msg, countries=countries) def raise_no_formats(self, msg, expected=False, video_id=None): - if expected and self.get_param('ignore_no_formats_error'): + if expected and ( + self.get_param('ignore_no_formats_error') or self.get_param('wait_for_video')): self.report_warning(msg, video_id) elif isinstance(msg, ExtractorError): raise msg |