mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-19 14:38:53 +00:00
Implement --add-header without modifying std_headers
Closes #2526, #1614
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user