Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用httpx并请求一些旧网站的 xhr
# ... some errors httpx.ConnectError: [SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:1131)
我在使用相关时解决了这个问题requests
requests
如何在 httpx 中解决这个问题?
verify=False
一旦你把这段代码放在顶部,它就解决了
httpx._config.DEFAULT_CIPHERS += ":ALL:@SECLEVEL=1"
但我不确定这是否是正确的方式