diff options
| author | dirkf <fieldhouse@gmx.net> | 2024-02-21 16:29:08 +0000 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-21 16:29:08 +0000 | 
| commit | 48ddab1f3a616d40480818ec9b73eaa27e3a55fa (patch) | |
| tree | 208aab637e53825fa5670afc5c0a24b14d2c8f2a | |
| parent | 7687389f08a5c7c49e57d1b7f7b11b1c87b47b68 (diff) | |
[downloader/external] Fix WgetFD proxy (rev 2) 
From PR (defunct source), closes #29343.
Matches https://github.com/yt-dlp/yt-dlp/pull/3152
Thx former user kikuyan.
| -rw-r--r-- | youtube_dl/downloader/external.py | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py index 7fc864e85..bc228960e 100644 --- a/youtube_dl/downloader/external.py +++ b/youtube_dl/downloader/external.py @@ -206,7 +206,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']] | 
