mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 14:14:54 +01:00
[twitch:stream] Clarify channel_id reassignment rationale (#6263)
This commit is contained in:
parent
1793d71db6
commit
0696667734
|
@ -346,6 +346,10 @@ def _real_extract(self, url):
|
||||||
'http://www.twitch.tv/%s/profile' % channel_id,
|
'http://www.twitch.tv/%s/profile' % channel_id,
|
||||||
'TwitchProfile', channel_id)
|
'TwitchProfile', channel_id)
|
||||||
|
|
||||||
|
# Channel name may be typed if different case than the original channel name
|
||||||
|
# (e.g. http://www.twitch.tv/TWITCHPLAYSPOKEMON) that will lead to constructing
|
||||||
|
# an invalid m3u8 URL. Working around by use of original channel name from stream
|
||||||
|
# JSON and fallback to lowercase if it's not available.
|
||||||
channel_id = stream.get('channel', {}).get('name') or channel_id.lower()
|
channel_id = stream.get('channel', {}).get('name') or channel_id.lower()
|
||||||
|
|
||||||
access_token = self._download_json(
|
access_token = self._download_json(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user