diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-07-26 09:23:10 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-07-26 09:33:19 +0530 |
commit | 693f060040967e0ce5d9769d64b0cdd059c054d2 (patch) | |
tree | b9d0c6a357649de09c4ed025b22b44a8df2303d3 /yt_dlp/extractor/twitch.py | |
parent | 3bec830a597e8c7ab0d9f4e1258dc4a1be0b1de4 (diff) |
[youtube,twitch] Allow waiting for channels to become live
Closes #2597
Diffstat (limited to 'yt_dlp/extractor/twitch.py')
-rw-r--r-- | yt_dlp/extractor/twitch.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/yt_dlp/extractor/twitch.py b/yt_dlp/extractor/twitch.py index a0cb0be02..32cfd8a08 100644 --- a/yt_dlp/extractor/twitch.py +++ b/yt_dlp/extractor/twitch.py @@ -12,10 +12,11 @@ from ..compat import ( compat_urllib_parse_urlparse, ) from ..utils import ( + ExtractorError, + UserNotLive, base_url, clean_html, dict_get, - ExtractorError, float_or_none, int_or_none, parse_duration, @@ -940,7 +941,7 @@ class TwitchStreamIE(TwitchBaseIE): stream = user['stream'] if not stream: - raise ExtractorError('%s is offline' % channel_name, expected=True) + raise UserNotLive(video_id=channel_name) access_token = self._download_access_token( channel_name, 'stream', 'channelName') |