[youtube,twitch] Allow waiting for channels to become live
Closes #2597
This commit is contained in:
parent
3bec830a59
commit
693f060040
4 changed files with 25 additions and 8 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue