projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1793d71
)
[twitch:stream] Clarify channel_id reassignment rationale (#6263)
author
Sergey M․
<dstftw@gmail.com>
Sat, 18 Jul 2015 00:27:45 +0000
(06:27 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 18 Jul 2015 00:27:45 +0000
(06:27 +0600)
youtube_dl/extractor/twitch.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/twitch.py
b/youtube_dl/extractor/twitch.py
index ab557a1a57f4936b7f93d46269607127324740bf..948c8ce39e6eb4de1fd4c3746af71f2d8d67a7a7 100644
(file)
--- 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)
'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(
channel_id = stream.get('channel', {}).get('name') or channel_id.lower()
access_token = self._download_json(