[youtube] Correctly disable polymer on all requests
authorNiklas Haas <git@haasn.xyz>
Sun, 29 Apr 2018 09:23:23 +0000 (11:23 +0200)
committerSergey M <dstftw@gmail.com>
Sun, 29 Apr 2018 15:35:16 +0000 (22:35 +0700)
Rather than just the one that use the _download_webpage helper. The need
for this was made apparent by 0fe7783e, which refactored
_download_json in a way that completely avoids the use of
_download_webpage, thus breaking youtube.

Fixes #16323

youtube_dl/extractor/youtube.py

index e7bd1f18fb504c8541d0fbdc301980cab07d1f54..04aeb91af6d344bfdca3ca55786b61483a882a17 100644 (file)
@@ -246,9 +246,9 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
 
         return True
 
-    def _download_webpage(self, *args, **kwargs):
+    def _download_webpage_handle(self, *args, **kwargs):
         kwargs.setdefault('query', {})['disable_polymer'] = 'true'
-        return super(YoutubeBaseInfoExtractor, self)._download_webpage(
+        return super(YoutubeBaseInfoExtractor, self)._download_webpage_handle(
             *args, **compat_kwargs(kwargs))
 
     def _real_initialize(self):