帖子链接在这里
[Python] 纯文本查看 复制代码 # 默认 cipher 在这里定义:[url]https://github.com/encode/httpx/blob/master/httpx/_config.py[/url]
import ssl
import httpx
# create an ssl context
ssl_context = ssl.SSLContext(protocol=ssl.PROTOCOL_TLS)
CIPHERS = 'ECDH+AESGCM:ECDH+CHACHA20:DH+AESGCM:DH+CHACHA20:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+HIGH:DH+HIGH:RSA+AESGCM:RSA+AES:RSA+HIGH'
ssl_context.set_ciphers(CIPHERS)
r = httpx.get('https://tls.browserleaks.com/json', verify=ssl_context)
print(r.json())
# {'ja3_hash': 'cc8fc04d55d8c9c318409384eee468b6'
类似这种操作。给个案例修改我们的框架如何改。
|