aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2015-01-24 18:25:09 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2015-01-24 18:25:09 +0100
commit587a9c27496979d983296944fee8d1fa589e1b85 (patch)
tree3e5506f93520598f80693c44c9034882bc0f6a69
parente1554a407d8953d0ec4fabec7f5a3b3906d1029b (diff)
downloadyoutube-dl-587a9c27496979d983296944fee8d1fa589e1b85.tar.xz
[downloader/external] Use the 'http_headers' field
-rw-r--r--youtube_dl/downloader/external.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py
index 7ebe40096..5bf24ccbb 100644
--- a/youtube_dl/downloader/external.py
+++ b/youtube_dl/downloader/external.py
@@ -49,9 +49,9 @@ class ExternalFD(FileDownloader):
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: