aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2015-03-03 00:03:06 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2015-03-03 00:03:06 +0100
commit91410c9bfa9fd8f01fb817474bcc7b0db5cabf95 (patch)
treef945f83ed897b9546e3a82dca31195684781b03d /youtube_dl/YoutubeDL.py
parenta7440261c52d6518a429210aaae598095112c61b (diff)
downloadyoutube-dl-91410c9bfa9fd8f01fb817474bcc7b0db5cabf95.tar.xz
[letv] Add --cn-verification-proxy (Closes #5077)
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-xyoutube_dl/YoutubeDL.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index e0baa9872..915963d96 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -54,6 +54,7 @@ from .utils import (
MaxDownloadsReached,
PagedList,
parse_filesize,
+ PerRequestProxyHandler,
PostProcessingError,
platform_name,
preferredencoding,
@@ -183,6 +184,8 @@ class YoutubeDL(object):
prefer_insecure: Use HTTP instead of HTTPS to retrieve information.
At the moment, this is only supported by YouTube.
proxy: URL of the proxy server to use
+ cn_verification_proxy: URL of the proxy to use for IP address verification
+ on Chinese sites. (Experimental)
socket_timeout: Time to wait for unresponsive hosts, in seconds
bidi_workaround: Work around buggy terminals without bidirectional text
support, using fridibi
@@ -1762,7 +1765,7 @@ class YoutubeDL(object):
# Set HTTPS proxy to HTTP one if given (https://github.com/rg3/youtube-dl/issues/805)
if 'http' in proxies and 'https' not in proxies:
proxies['https'] = proxies['http']
- proxy_handler = compat_urllib_request.ProxyHandler(proxies)
+ proxy_handler = PerRequestProxyHandler(proxies)
debuglevel = 1 if self.params.get('debug_printtraffic') else 0
https_handler = make_HTTPS_handler(self.params, debuglevel=debuglevel)