mirror of
				https://github.com/ytdl-org/youtube-dl.git
				synced 2025-10-29 09:26:20 -07:00 
			
		
		
		
	[twitch] Don't pollute default headers dict
This commit is contained in:
		| @@ -51,7 +51,9 @@ class TwitchBaseIE(InfoExtractor): | ||||
|                 expected=True) | ||||
|  | ||||
|     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( | ||||
|             '%s/%s' % (self._API_BASE, path), item_id, | ||||
|             *args, **compat_kwargs(kwargs)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user