1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-02 09:12:40 +01:00

[downloader/external] Use the 'http_headers' field

This commit is contained in:
Jaime Marquínez Ferrándiz 2015-01-24 18:25:09 +01:00
parent e1554a407d
commit 587a9c2749

View File

@ -49,9 +49,9 @@ def supports(cls, info_dict):
def _calc_headers(self, info_dict):
res = std_headers.copy()
ua = info_dict.get('user_agent')
if ua is not None:
res['User-Agent'] = ua
add_headers = info_dict.get('http_headers')
if add_headers:
res.update(add_headers)
cookies = self._calc_cookies(info_dict)
if cookies: