[ie/twitch:videos] Raise error when channel is not found (#15458)
Closes #15450 Authored by: 0xvd
This commit is contained in:
parent
3763d0d4ab
commit
e15ca65874
1 changed files with 4 additions and 0 deletions
|
|
@ -680,6 +680,10 @@ class TwitchPlaylistBaseIE(TwitchBaseIE):
|
||||||
}],
|
}],
|
||||||
f'Downloading {self._NODE_KIND}s GraphQL page {page_num}',
|
f'Downloading {self._NODE_KIND}s GraphQL page {page_num}',
|
||||||
fatal=False)
|
fatal=False)
|
||||||
|
# Avoid extracting random/unrelated entries when channel_name doesn't exist
|
||||||
|
# See https://github.com/yt-dlp/yt-dlp/issues/15450
|
||||||
|
if traverse_obj(page, (0, 'data', 'user', 'id', {str})) == '':
|
||||||
|
raise ExtractorError(f'Channel "{channel_name}" not found', expected=True)
|
||||||
if not page:
|
if not page:
|
||||||
break
|
break
|
||||||
edges = try_get(
|
edges = try_get(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue