[youtube] Don't pollute default query dict (closes #17593)
authorSergey M․ <dstftw@gmail.com>
Mon, 17 Sep 2018 15:13:39 +0000 (22:13 +0700)
committerSergey M․ <dstftw@gmail.com>
Mon, 17 Sep 2018 15:13:39 +0000 (22:13 +0700)
youtube_dl/extractor/youtube.py

index 2fe074cb4339bf9fd560af1a9eeab295ac3d4a30..e80e36f988196dfa2490e99013134008dc2066bd 100644 (file)
@@ -259,7 +259,9 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
         return True
 
     def _download_webpage_handle(self, *args, **kwargs):
-        kwargs.setdefault('query', {})['disable_polymer'] = 'true'
+        query = kwargs.get('query', {}).copy()
+        query['disable_polymer'] = 'true'
+        kwargs['query'] = query
         return super(YoutubeBaseInfoExtractor, self)._download_webpage_handle(
             *args, **compat_kwargs(kwargs))