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 @@ If you fork the project on GitHub, you can run your fork's [build workflow](.git
that do not support RFC 5746 secure that do not support RFC 5746 secure
renegotiation renegotiation
--no-check-certificates Suppress HTTPS certificate validation --no-check-certificates Suppress HTTPS certificate validation
--no-check-proxy-certificates Suppress HTTPS Proxy certificate validation
--prefer-insecure Use an unencrypted connection to retrieve --prefer-insecure Use an unencrypted connection to retrieve
information about the video (Currently information about the video (Currently
supported only for YouTube) supported only for YouTube)
@ -882,6 +883,18 @@ If you fork the project on GitHub, you can run your fork's [build workflow](.git
Password for client certificate private key, Password for client certificate private key,
if encrypted. If not provided, and the key if encrypted. If not provided, and the key
is encrypted, yt-dlp will ask interactively 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: ## Post-Processing Options:
-x, --extract-audio Convert video files to audio-only files -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': opts.client_certificate,
'client_certificate_key': opts.client_certificate_key, 'client_certificate_key': opts.client_certificate_key,
'client_certificate_password': opts.client_certificate_password, '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, 'quiet': opts.quiet,
'no_warnings': opts.no_warnings, 'no_warnings': opts.no_warnings,
'forceurl': opts.geturl, 'forceurl': opts.geturl,
@ -902,6 +905,7 @@ def parse_options(argv=None):
'cookiesfrombrowser': opts.cookiesfrombrowser, 'cookiesfrombrowser': opts.cookiesfrombrowser,
'legacyserverconnect': opts.legacy_server_connect, 'legacyserverconnect': opts.legacy_server_connect,
'nocheckcertificate': opts.no_check_certificate, 'nocheckcertificate': opts.no_check_certificate,
'proxy_nocheckcertificate': opts.proxy_no_check_certificate,
'prefer_insecure': opts.prefer_insecure, 'prefer_insecure': opts.prefer_insecure,
'enable_file_urls': opts.enable_file_urls, 'enable_file_urls': opts.enable_file_urls,
'http_headers': opts.headers, 'http_headers': opts.headers,

View file

@ -781,6 +781,20 @@ def create_parser():
help='Password for client certificate private key, if encrypted. ' help='Password for client certificate private key, if encrypted. '
'If not provided, and the key is encrypted, yt-dlp will ask interactively') '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 = optparse.OptionGroup(parser, 'Video Format Options')
video_format.add_option( video_format.add_option(
'-f', '--format', '-f', '--format',
@ -1084,6 +1098,10 @@ def create_parser():
'--no-check-certificates', '--no-check-certificates',
action='store_true', dest='no_check_certificate', default=False, action='store_true', dest='no_check_certificate', default=False,
help='Suppress HTTPS certificate validation') 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( workarounds.add_option(
'--prefer-insecure', '--prefer-unsecure', '--prefer-insecure', '--prefer-unsecure',
action='store_true', dest='prefer_insecure', action='store_true', dest='prefer_insecure',