src/streamlink_cli/main.py
def setup_http_session():
    """Sets the global HTTP settings, such as proxy and headers."""
    if args.http_proxy:
        streamlink.set_option("http-proxy", args.http_proxy)

    if args.https_proxy:
        streamlink.set_option("https-proxy", args.https_proxy)

    if args.http_cookie:
        streamlink.set_option("http-cookies", dict(args.http_cookie))

    if args.http_header:
        streamlink.set_option("http-headers", dict(args.http_header))

    if args.http_query_param:
        streamlink.set_option("http-query-params", dict(args.http_query_param))

    if args.http_ignore_env:
        streamlink.set_option("http-trust-env", False)

    if args.http_no_ssl_verify:
        streamlink.set_option("http-ssl-verify", False)

    if args.http_disable_dh:
        streamlink.set_option("http-disable-dh", True)

    if args.http_ssl_cert:
        streamlink.set_option("http-ssl-cert", args.http_ssl_cert)

    if args.http_ssl_cert_crt_key:
        streamlink.set_option("http-ssl-cert", tuple(args.http_ssl_cert_crt_key))

    if args.http_timeout:
        streamlink.set_option("http-timeout", args.http_timeout)

    if args.http_cookies:
        streamlink.set_option("http-cookies", args.http_cookies)

    if args.http_headers:
        streamlink.set_option("http-headers", args.http_headers)

    if args.http_query_params:
        streamlink.set_option("http-query-params", args.http_query_params)
def setup_http_session():
    if args.http_proxy:
        streamlink.set_option("http-proxy", args.http_proxy)

    if args.https_proxy:
        streamlink.set_option("https-proxy", args.https_proxy)

    if args.http_cookie:
        streamlink.set_option("http-cookies", dict(args.http_cookie))

    if args.http_header:
        streamlink.set_option("http-headers", dict(args.http_header))

    if args.http_query_param:
        streamlink.set_option("http-query-params", dict(args.http_query_param))

    if args.http_ignore_env:
        streamlink.set_option("http-trust-env", False)

    if args.http_no_ssl_verify:
        streamlink.set_option("http-ssl-verify", False)

    if args.http_disable_dh:
        streamlink.set_option("http-disable-dh", True)

    if args.http_ssl_cert:
        streamlink.set_option("http-ssl-cert", args.http_ssl_cert)

    if args.http_ssl_cert_crt_key:
        streamlink.set_option("http-ssl-cert", tuple(args.http_ssl_cert_crt_key))

    if args.http_timeout:
        streamlink.set_option("http-timeout", args.http_timeout)

    if args.http_cookies:
        streamlink.set_option("http-cookies", args.http_cookies)

    if args.http_headers:
        streamlink.set_option("http-headers", args.http_headers)

    if args.http_query_params:
        streamlink.set_option("http-query-params", args.http_query_params)
def setup_http_session ( ) : if args . http_proxy : streamlink . set_option ( "http-proxy" , args . http_proxy ) if args . https_proxy : streamlink . set_option ( "https-proxy" , args . https_proxy ) if args . http_cookie : streamlink . set_option ( "http-cookies" , dict ( args . http_cookie ) ) if args . http_header : streamlink . set_option ( "http-headers" , dict ( args . http_header ) ) if args . http_query_param : streamlink . set_option ( "http-query-params" , dict ( args . http_query_param ) ) if args . http_ignore_env : streamlink . set_option ( "http-trust-env" , False ) if args . http_no_ssl_verify : streamlink . set_option ( "http-ssl-verify" , False ) if args . http_disable_dh : streamlink . set_option ( "http-disable-dh" , True ) if args . http_ssl_cert : streamlink . set_option ( "http-ssl-cert" , args . http_ssl_cert ) if args . http_ssl_cert_crt_key : streamlink . set_option ( "http-ssl-cert" , tuple ( args . http_ssl_cert_crt_key ) ) if args . http_timeout : streamlink . set_option ( "http-timeout" , args . http_timeout ) if args . http_cookies : streamlink . set_option ( "http-cookies" , args . http_cookies ) if args . http_headers : streamlink . set_option ( "http-headers" , args . http_headers ) if args . http_query_params : streamlink . set_option ( "http-query-params" , args . http_query_params )
Sets the global HTTP settings, such as proxy and headers.
Sets the global HTTP settings such as proxy and headers .