diff options
author | coletdev <coletdjnz@protonmail.com> | 2022-03-23 10:24:27 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-22 14:24:27 -0700 |
commit | 8a23db95197282159efe970ca0ac69c97def60d3 (patch) | |
tree | 5ea755c42a63ed699549eab25976f52528c88caa | |
parent | 1f1df1251e869cb539ed8ae9d72590d2b2e275a6 (diff) | |
download | hypervideo-pre-8a23db95197282159efe970ca0ac69c97def60d3.tar.lz hypervideo-pre-8a23db95197282159efe970ca0ac69c97def60d3.tar.xz hypervideo-pre-8a23db95197282159efe970ca0ac69c97def60d3.zip |
[wget] Fix proxy (#3152)
Upstream PR: https://github.com/ytdl-org/youtube-dl/pull/29343
Authored-by: kikuyan, coletdjnz
-rw-r--r-- | yt_dlp/downloader/external.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/yt_dlp/downloader/external.py b/yt_dlp/downloader/external.py index be6202eef..cfa646ebc 100644 --- a/yt_dlp/downloader/external.py +++ b/yt_dlp/downloader/external.py @@ -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']] |