1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-31 06:35:12 +00:00

Implement --add-header without modifying std_headers

Closes #2526, #1614
This commit is contained in:
pukkandan
2022-01-29 03:25:35 +05:30
parent e48b3875ec
commit 8b7539d27c
10 changed files with 28 additions and 29 deletions

View File

@@ -28,7 +28,6 @@ from ..utils import (
parse_qs,
sanitized_Request,
smuggle_url,
std_headers,
str_or_none,
try_get,
unified_timestamp,
@@ -758,7 +757,7 @@ class VimeoIE(VimeoBaseInfoExtractor):
def _real_extract(self, url):
url, data = unsmuggle_url(url, {})
headers = std_headers.copy()
headers = self.get_param('http_headers').copy()
if 'http_headers' in data:
headers.update(data['http_headers'])
if 'Referer' not in headers: