mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-28 16:24:09 +00:00
[downloader/external] Use the 'http_headers' field
This commit is contained in:
parent
e1554a407d
commit
587a9c2749
1 changed files with 3 additions and 3 deletions
|
@ -49,9 +49,9 @@ def supports(cls, info_dict):
|
||||||
def _calc_headers(self, info_dict):
|
def _calc_headers(self, info_dict):
|
||||||
res = std_headers.copy()
|
res = std_headers.copy()
|
||||||
|
|
||||||
ua = info_dict.get('user_agent')
|
add_headers = info_dict.get('http_headers')
|
||||||
if ua is not None:
|
if add_headers:
|
||||||
res['User-Agent'] = ua
|
res.update(add_headers)
|
||||||
|
|
||||||
cookies = self._calc_cookies(info_dict)
|
cookies = self._calc_cookies(info_dict)
|
||||||
if cookies:
|
if cookies:
|
||||||
|
|
Loading…
Reference in a new issue