projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce3735d
)
[twitch:stream] Expect 400 and 410 HTTP errors from API
author
Sergey M․
<dstftw@gmail.com>
Fri, 5 Jun 2020 17:57:40 +0000
(
00:57
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Fri, 5 Jun 2020 17:57:40 +0000
(
00:57
+0700)
youtube_dl/extractor/twitch.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/twitch.py
b/youtube_dl/extractor/twitch.py
index 4cd5f0db4553c8d19b59c5384fce85fa841d1ce6..e211cd4c84cb4c713e937cf0e1eef83de7c40a93 100644
(file)
--- a/
youtube_dl/extractor/twitch.py
+++ b/
youtube_dl/extractor/twitch.py
@@
-56,7
+56,10
@@
class TwitchBaseIE(InfoExtractor):
'Accept': 'application/vnd.twitchtv.v5+json; charset=UTF-8',
'Client-ID': self._CLIENT_ID,
})
- kwargs['headers'] = headers
+ kwargs.update({
+ 'headers': headers,
+ 'expected_status': (400, 410),
+ })
response = self._download_json(
'%s/%s' % (self._API_BASE, path), item_id,
*args, **compat_kwargs(kwargs))