[utils] Correct per-request proxy handling

This commit is contained in:
Philipp Hagemeister 2015-03-03 13:56:06 +01:00
parent 91410c9bfa
commit 2461f79d2a
3 changed files with 17 additions and 11 deletions

View file

@ -1771,7 +1771,8 @@ class YoutubeDL(object):
https_handler = make_HTTPS_handler(self.params, debuglevel=debuglevel)
ydlh = YoutubeDLHandler(self.params, debuglevel=debuglevel)
opener = compat_urllib_request.build_opener(
https_handler, proxy_handler, cookie_processor, ydlh)
proxy_handler, https_handler, cookie_processor, ydlh)
# Delete the default user-agent header, which would otherwise apply in
# cases where our custom HTTP handler doesn't come into play
# (See https://github.com/rg3/youtube-dl/issues/1309 for details)