diff options
| author | Sergey M․ <dstftw@gmail.com> | 2020-06-06 00:57:40 +0700 | 
|---|---|---|
| committer | Sergey M․ <dstftw@gmail.com> | 2020-06-06 00:57:40 +0700 | 
| commit | b37e47a3f980c2470882ec83dda43c8166ddb3cd (patch) | |
| tree | d1cf18ad50715b76263da8e06122bde1d03dc682 /youtube_dl/extractor/twitch.py | |
| parent | ce3735df0270ef4dfd86a527c4d0edff822dd920 (diff) | |
[twitch:stream] Expect 400 and 410 HTTP errors from API
Diffstat (limited to 'youtube_dl/extractor/twitch.py')
| -rw-r--r-- | youtube_dl/extractor/twitch.py | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/youtube_dl/extractor/twitch.py b/youtube_dl/extractor/twitch.py index 4cd5f0db4..e211cd4c8 100644 --- 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)) | 
