[extractors] Use http_headers for setting the User-Agent and the Referer
This commit is contained in:
parent
3fcfb8e9fa
commit
e1554a407d
5 changed files with 9 additions and 8 deletions
|
@ -24,10 +24,6 @@ class HttpFD(FileDownloader):
|
|||
|
||||
# Do not include the Accept-Encoding header
|
||||
headers = {'Youtubedl-no-compression': 'True'}
|
||||
if 'user_agent' in info_dict:
|
||||
headers['User-agent'] = info_dict['user_agent']
|
||||
if 'http_referer' in info_dict:
|
||||
headers['Referer'] = info_dict['http_referer']
|
||||
add_headers = info_dict.get('http_headers')
|
||||
if add_headers:
|
||||
headers.update(add_headers)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue