#python3 speedtest.py
Retrieving speedtest.net configuration...
Cannot retrieve speedtest configuration
ERROR: <urlopen error timed out>
改为
python speedtest.py
就能正常运行了
Retrieving speedtest.net configuration...
Cannot retrieve speedtest configuration
ERROR: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:618)>
在 speedtest.py 文件第一行加上
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
还有可能是dns找不到服务器IP报错
ping speedtest.net
如果能ping通,就不是dns报错