[wget] Fix proxy (#3152)

Upstream PR: https://github.com/ytdl-org/youtube-dl/pull/29343
Authored-by: kikuyan, coletdjnz
pull/3168/head
coletdev 2 years ago committed by GitHub
parent 1f1df1251e
commit 8a23db9519
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -230,7 +230,10 @@ class WgetFD(ExternalFD):
retry[1] = '0'
cmd += retry
cmd += self._option('--bind-address', 'source_address')
cmd += self._option('--proxy', 'proxy')
proxy = self.params.get('proxy')
if proxy:
for var in ('http_proxy', 'https_proxy'):
cmd += ['--execute', '%s=%s' % (var, proxy)]
cmd += self._valueless_option('--no-check-certificate', 'nocheckcertificate')
cmd += self._configuration_args()
cmd += ['--', info_dict['url']]

Loading…
Cancel
Save