Skip to content

Commit

Permalink
Only remove user agent if it matches.
Browse files Browse the repository at this point in the history
In some cases we may want to provide a custom user agent
  • Loading branch information
coletdjnz committed Jan 1, 2024
1 parent cfdfeb0 commit d644aeb
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion yt_dlp/networking/impersonate.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ def _get_impersonate_headers(self, request):
headers = self._merge_headers(request.headers)
if self._get_request_target(request) is not None:
# remove all headers present in std_headers
headers.pop('User-Agent', None)
for header in std_headers:
if header in headers and std_headers[header] == headers[header]:
headers.pop(header, None)
Expand Down

0 comments on commit d644aeb

Please sign in to comment.