0
0
Fork 0

[twitch:stream] Expect 400 and 410 HTTP errors from API

main
Sergey M․ 2020-06-06 00:57:40 +07:00
parent ce3735df02
commit b37e47a3f9
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D
1 changed files with 4 additions and 1 deletions

View File

@ -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))