diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-07-18 06:27:45 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-07-18 06:27:45 +0600 |
commit | 06966677343c4bbb51e8da3f0ed4d4985bdf54f2 (patch) | |
tree | 5ea92812c5c5bbe7652395511846ec4f1906fb10 /youtube_dl | |
parent | 1793d71db61acc9f6cceefbc63d7de2b558b7582 (diff) |
[twitch:stream] Clarify channel_id reassignment rationale (#6263)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/twitch.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/extractor/twitch.py b/youtube_dl/extractor/twitch.py index ab557a1a5..948c8ce39 100644 --- a/youtube_dl/extractor/twitch.py +++ b/youtube_dl/extractor/twitch.py @@ -346,6 +346,10 @@ class TwitchStreamIE(TwitchBaseIE): 'http://www.twitch.tv/%s/profile' % 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() access_token = self._download_json( |