mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-20 21:34:01 -07:00
Proper support for changing User-Agents from IEs
This commit is contained in:
parent
db16276b7c
commit
3446dfb7cb
3 changed files with 11 additions and 4 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue