mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-15 15:52:38 +00:00
[twitch] Don't pollute default headers dict
This commit is contained in:
parent
c11485162b
commit
e2f61598be
1 changed files with 3 additions and 1 deletions
|
@ -51,7 +51,9 @@ class TwitchBaseIE(InfoExtractor):
|
||||||
expected=True)
|
expected=True)
|
||||||
|
|
||||||
def _call_api(self, path, item_id, *args, **kwargs):
|
def _call_api(self, path, item_id, *args, **kwargs):
|
||||||
kwargs.setdefault('headers', {})['Client-ID'] = self._CLIENT_ID
|
headers = kwargs.get('headers', {}).copy()
|
||||||
|
headers['Client-ID'] = self._CLIENT_ID
|
||||||
|
kwargs['headers'] = headers
|
||||||
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 a new issue