]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[twitch:stream] Expect 400 and 410 HTTP errors from API
authorSergey M․ <dstftw@gmail.com>
Fri, 5 Jun 2020 17:57:40 +0000 (00:57 +0700)
committerSergey M․ <dstftw@gmail.com>
Fri, 5 Jun 2020 17:57:40 +0000 (00:57 +0700)
youtube_dl/extractor/twitch.py

index 4cd5f0db4553c8d19b59c5384fce85fa841d1ce6..e211cd4c84cb4c713e937cf0e1eef83de7c40a93 100644 (file)
@@ -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))