1
1
mirror of https://github.com/ytdl-org/youtube-dl synced 2024-11-30 14:42:58 +01:00

[twitch:stream] Add support for rebroadcasts (closes #10995)

This commit is contained in:
Sergey M․ 2016-10-23 17:20:45 +07:00
parent 425f3fdfcb
commit 9aa929d337
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -398,7 +398,7 @@ class TwitchStreamIE(TwitchBaseIE):
channel_id = self._match_id(url) channel_id = self._match_id(url)
stream = self._call_api( stream = self._call_api(
'kraken/streams/%s' % channel_id, channel_id, 'kraken/streams/%s?stream_type=all' % channel_id, channel_id,
'Downloading stream JSON').get('stream') 'Downloading stream JSON').get('stream')
if not stream: if not stream:
@ -417,6 +417,7 @@ class TwitchStreamIE(TwitchBaseIE):
query = { query = {
'allow_source': 'true', 'allow_source': 'true',
'allow_audio_only': 'true', 'allow_audio_only': 'true',
'allow_spectre': 'true',
'p': random.randint(1000000, 10000000), 'p': random.randint(1000000, 10000000),
'player': 'twitchweb', 'player': 'twitchweb',
'segment_preference': '4', 'segment_preference': '4',