Caused by ProxyError(‘Unable to connect to proxy‘, SSLError(SSLEOFError(8, ‘[SSL: UNEXPECTED_EOF_WHI

背景

有个网站开了代理,浏览器可以访问,但是命令行ping不通,telnet不通,python requests请求报上述错误

解决方案

配置代理,改成http请求

url = "http://m.zhibo8.com/news/web/zuqiu/2024-12-02/match1437755date2024vnative.htm"  # 替换为实际的网页链接

proxies = {
    'http': 'http://127.0.0.1:7890',
    # 'https': 'https://127.0.0.1:7890'
}

# 发送请求并获取网页内容
response = requests.get(url, proxies=proxies, verify=False)

参考

This error is related to an issue with SSL while attempting to connect to a server through a proxy. Here’s a breakdown of the problem and possible solutions:

Problem Details

  1. ProxyError: The application was unable to establish a connection to the proxy server.
  2. SSLError: The SSL/TLS handshake failed.
  3. SSLEOFError: The server abruptly closed the connection during the handshake, which is against the SSL protocol.

Common Causes

  1. Incorrect Proxy Configuration: The proxy settings (URL, port, username/password) might be incorrect.
  2. Incompatible SSL/TLS Version: The server or proxy might req
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值