upbit/pixivpy

Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure

Josiahhx opened this issue · 4 comments

pixivpy3.utils.PixivError: requests POST https://app-api.pixiv.net.cdn.cloudflare.net./auth/token error: HTTPSConnectionPool(host='app-api.pixiv.net.cdn.cloudflare.net.', port=443): Max retries exceeded with url: /auth/token (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1108)')))

请问是ip被封了吗,调用的byPassSniApi

upbit commented

解析到 cloudflare 了,应该是没绕过。可以看看是哪个DNS返回的,把对应DNS屏蔽掉重新解析试试

解析到 cloudflare 了,应该是没绕过。可以看看是哪个DNS返回的,把对应DNS屏蔽掉重新解析试试

这样算更换dns吗,但是我现在还是这个报错
`C:\Users\crbhf>nslookup pixiv.net
服务器: public1.114dns.com
Address: 114.114.114.114

非权威应答:
名称: pixiv.net
Address: 199.193.116.105

C:\Users\crbhf>nslookup pixiv.net
服务器: dns.google
Address: 8.8.8.8

非权威应答:
名称: pixiv.net
Addresses: 2001::42dc:9e11
108.160.166.142

C:\Users\crbhf>nslookup pixiv.net
服务器: public1.alidns.com
Address: 223.5.5.5

非权威应答:
名称: pixiv.net
Addresses: 2001::453f:be02
104.23.124.189`

用google的dns试试看?比如8.8.8.8,我刚刚也遇到这个问题,换个dns就解决了。

python/cpython#16820

import ssl
cert = ssl.get_server_certificate(('baidu.com', 443))
cert = ssl.get_server_certificate(('app-api.pixiv.net.cdn.cloudflare.net', 443)) # ssl_handshake error