1
0
Fork 0
mirror of https://github.com/blackjack4494/yt-dlc.git synced 2024-12-23 16:26:40 +00:00

[vimeo] Don't pollute std_headers

Fixes #8778
This commit is contained in:
Yen Chi Hsuan 2016-03-06 17:01:05 +08:00
parent 1b5284b13f
commit 0f56a4b443

View file

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