aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/FileDownloader.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-01-12 16:49:13 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-01-12 16:49:13 +0100
commit3446dfb7cb84025f67250be069e44020d3606b84 (patch)
treed7fc131820c623b23b9630d45e4c6df7906c0d64 /youtube_dl/FileDownloader.py
parentdb16276b7cc0d106d62bc6b280787bfa4022f4e3 (diff)
Proper support for changing User-Agents from IEs
Diffstat (limited to 'youtube_dl/FileDownloader.py')
-rw-r--r--youtube_dl/FileDownloader.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py
index 51df4c175..04ecd1ac5 100644
--- a/youtube_dl/FileDownloader.py
+++ b/youtube_dl/FileDownloader.py
@@ -620,6 +620,8 @@ class FileDownloader(object):
# Do not include the Accept-Encoding header
headers = {'Youtubedl-no-compression': 'True'}
+ if 'user_agent' in info_dict:
+ headers['Youtubedl-user-agent'] = info_dict['user_agent']
basic_request = compat_urllib_request.Request(url, None, headers)
request = compat_urllib_request.Request(url, None, headers)