projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8027175
)
Allow unsetting the proxy with the --proxy option
author
Philipp Hagemeister
<phihag@phihag.de>
Sun, 9 Jun 2013 21:43:18 +0000
(23:43 +0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Sun, 9 Jun 2013 21:43:18 +0000
(23:43 +0200)
youtube_dl/__init__.py
patch
|
blob
|
history
diff --git
a/youtube_dl/__init__.py
b/youtube_dl/__init__.py
index 308c48fe6e6c408efa10b1ea156759f7b829a0cd..9279ce7769967b9b2df69a1d1c88d6b0701b6beb 100644
(file)
--- 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)