X-Git-Url: https://git.rapsys.eu/youtubedl/blobdiff_plain/28d5370e4a3ed87a622c07b81844b14420e5bcba..4de6182674f4565b37e56cd66e8446a4f78deb8a:/youtube_dl/__init__.py diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 308c48f..9279ce7 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -392,8 +392,11 @@ def _real_main(argv=None): # General configuration cookie_processor = compat_urllib_request.HTTPCookieProcessor(jar) - if opts.proxy: - proxies = {'http': opts.proxy, 'https': opts.proxy} + if opts.proxy is not None: + if opts.proxy == '': + proxies = {} + else: + proxies = {'http': opts.proxy, 'https': opts.proxy} else: proxies = compat_urllib_request.getproxies() # Set HTTPS proxy to HTTP one if given (https://github.com/rg3/youtube-dl/issues/805)