mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-12-25 15:57:55 +01:00
[twitch:stream] Expect 400 and 410 HTTP errors from API
This commit is contained in:
parent
4371c2a91b
commit
850d856bd0
@ -56,7 +56,10 @@ class TwitchBaseIE(InfoExtractor):
|
|||||||
'Accept': 'application/vnd.twitchtv.v5+json; charset=UTF-8',
|
'Accept': 'application/vnd.twitchtv.v5+json; charset=UTF-8',
|
||||||
'Client-ID': self._CLIENT_ID,
|
'Client-ID': self._CLIENT_ID,
|
||||||
})
|
})
|
||||||
kwargs['headers'] = headers
|
kwargs.update({
|
||||||
|
'headers': headers,
|
||||||
|
'expected_status': (400, 410),
|
||||||
|
})
|
||||||
response = self._download_json(
|
response = self._download_json(
|
||||||
'%s/%s' % (self._API_BASE, path), item_id,
|
'%s/%s' % (self._API_BASE, path), item_id,
|
||||||
*args, **compat_kwargs(kwargs))
|
*args, **compat_kwargs(kwargs))
|
||||||
|
Loading…
Reference in New Issue
Block a user