diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-01-12 16:49:13 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-01-12 16:49:13 +0100 |
commit | 3446dfb7cb84025f67250be069e44020d3606b84 (patch) | |
tree | d7fc131820c623b23b9630d45e4c6df7906c0d64 /youtube_dl/FileDownloader.py | |
parent | db16276b7cc0d106d62bc6b280787bfa4022f4e3 (diff) |
Proper support for changing User-Agents from IEs
Diffstat (limited to 'youtube_dl/FileDownloader.py')
-rw-r--r-- | youtube_dl/FileDownloader.py | 2 |
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) |