aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/__init__.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-05-04 12:19:02 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-05-04 12:22:56 +0200
commitea6d901e51c71714eb0f1c34594e2f50e20c7d0d (patch)
treedb0eb3300d820fa2e7019458f1381f751c3729ec /youtube_dl/__init__.py
parent4539dd30e6c00a50760094e7a41744843d659cb1 (diff)
Add --no-check-certificate (#814)
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r--youtube_dl/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index b8a82f932..05cb6e36a 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -149,6 +149,7 @@ def parseOpts(overrideArguments=None):
action='store_true', dest='list_extractors',
help='List all supported extractors and the URLs they would handle', default=False)
general.add_option('--proxy', dest='proxy', default=None, help='Use the specified HTTP/HTTPS proxy', metavar='URL')
+ general.add_option('--no-check-certificate', action='store_true', dest='no_check_certificate', default=False, help='Suppress HTTPS certificate validation.')
general.add_option('--test', action='store_true', dest='test', default=False, help=optparse.SUPPRESS_HELP)
selection.add_option('--playlist-start',
@@ -395,7 +396,7 @@ def _real_main(argv=None):
if 'http' in proxies and 'https' not in proxies:
proxies['https'] = proxies['http']
proxy_handler = compat_urllib_request.ProxyHandler(proxies)
- https_handler = compat_urllib_request.HTTPSHandler()
+ https_handler = make_HTTPS_handler(opts)
opener = compat_urllib_request.build_opener(https_handler, proxy_handler, cookie_processor, YoutubeDLHandler())
compat_urllib_request.install_opener(opener)
socket.setdefaulttimeout(300) # 5 minutes should be enough (famous last words)