]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[vimeo] Don't pollute std_headers
authorYen Chi Hsuan <yan12125@gmail.com>
Sun, 6 Mar 2016 09:01:05 +0000 (17:01 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Sun, 6 Mar 2016 09:01:05 +0000 (17:01 +0800)
Fixes #8778

youtube_dl/extractor/vimeo.py

index 9f282a1da68ac9889f9cfe667a1a8bc7b8b3a71f..560a80efd5d35fed1885a5032e819f3df4ed9bd5 100644 (file)
@@ -277,9 +277,8 @@ class VimeoIE(VimeoBaseInfoExtractor):
 
     def _real_extract(self, url):
         url, data = unsmuggle_url(url, {})
-        headers = std_headers
+        headers = std_headers.copy()
         if 'http_headers' in data:
-            headers = headers.copy()
             headers.update(data['http_headers'])
         if 'Referer' not in headers:
             headers['Referer'] = url
@@ -294,7 +293,7 @@ class VimeoIE(VimeoBaseInfoExtractor):
             url = 'https://vimeo.com/' + video_id
 
         # Retrieve video webpage to extract further information
-        request = sanitized_Request(url, None, headers)
+        request = sanitized_Request(url, headers=headers)
         try:
             webpage = self._download_webpage(request, video_id)
         except ExtractorError as ee: