Expose CLI args

This commit is contained in:
coletdjnz 2024-09-08 17:27:33 +12:00
parent a3cf32ad5b
commit fc8b4a3be9
No known key found for this signature in database
GPG Key ID: 91984263BB39894A
3 changed files with 35 additions and 0 deletions

View File

@ -777,6 +777,7 @@ ## Workarounds:
that do not support RFC 5746 secure
renegotiation
--no-check-certificates Suppress HTTPS certificate validation
--no-check-proxy-certificates Suppress HTTPS Proxy certificate validation
--prefer-insecure Use an unencrypted connection to retrieve
information about the video (Currently
supported only for YouTube)
@ -882,6 +883,18 @@ ## Authentication Options:
Password for client certificate private key,
if encrypted. If not provided, and the key
is encrypted, yt-dlp will ask interactively
--proxy-client-certificate CERTFILE
Path to client certificate file in PEM
format for HTTPS proxy. May include the
private key
--proxy-client-certificate-key KEYFILE
Path to private key file for client
certificate for HTTPS proxy
--proxy-client-certificate-password PASSWORD
Password for client certificate private key,
if encrypted, for HTTPS proxy. If not
provided, and the key is encrypted, yt-dlp
will ask interactively
## Post-Processing Options:
-x, --extract-audio Convert video files to audio-only files

View File

@ -790,6 +790,9 @@ def parse_options(argv=None):
'client_certificate': opts.client_certificate,
'client_certificate_key': opts.client_certificate_key,
'client_certificate_password': opts.client_certificate_password,
'proxy_client_certificate': opts.proxy_client_certificate,
'proxy_client_certificate_key': opts.proxy_client_certificate_key,
'proxy_client_certificate_password': opts.proxy_client_certificate_password,
'quiet': opts.quiet,
'no_warnings': opts.no_warnings,
'forceurl': opts.geturl,
@ -902,6 +905,7 @@ def parse_options(argv=None):
'cookiesfrombrowser': opts.cookiesfrombrowser,
'legacyserverconnect': opts.legacy_server_connect,
'nocheckcertificate': opts.no_check_certificate,
'proxy_nocheckcertificate': opts.proxy_no_check_certificate,
'prefer_insecure': opts.prefer_insecure,
'enable_file_urls': opts.enable_file_urls,
'http_headers': opts.headers,

View File

@ -781,6 +781,20 @@ def _alias_callback(option, opt_str, value, parser, opts, nargs):
help='Password for client certificate private key, if encrypted. '
'If not provided, and the key is encrypted, yt-dlp will ask interactively')
authentication.add_option(
'--proxy-client-certificate',
dest='proxy_client_certificate', metavar='CERTFILE',
help='Path to client certificate file in PEM format for HTTPS proxy. May include the private key')
authentication.add_option(
'--proxy-client-certificate-key',
dest='proxy_client_certificate_key', metavar='KEYFILE',
help='Path to private key file for client certificate for HTTPS proxy')
authentication.add_option(
'--proxy-client-certificate-password',
dest='proxy_client_certificate_password', metavar='PASSWORD',
help='Password for client certificate private key, if encrypted, for HTTPS proxy. '
'If not provided, and the key is encrypted, yt-dlp will ask interactively')
video_format = optparse.OptionGroup(parser, 'Video Format Options')
video_format.add_option(
'-f', '--format',
@ -1084,6 +1098,10 @@ def _alias_callback(option, opt_str, value, parser, opts, nargs):
'--no-check-certificates',
action='store_true', dest='no_check_certificate', default=False,
help='Suppress HTTPS certificate validation')
workarounds.add_option(
'--no-check-proxy-certificates',
action='store_true', dest='proxy_no_check_certificate', default=False,
help='Suppress HTTPS Proxy certificate validation')
workarounds.add_option(
'--prefer-insecure', '--prefer-unsecure',
action='store_true', dest='prefer_insecure',