From: Sergey M․ Date: Mon, 17 Sep 2018 15:13:39 +0000 (+0700) Subject: [youtube] Don't pollute default query dict (closes #17593) X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=c11485162bcbf6f517fd9225850a048fc5f7cec1;p=youtube-dl [youtube] Don't pollute default query dict (closes #17593) --- diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 2fe074cb4..e80e36f98 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -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))