Python测试网速 2022-12-19 应用软件开发 126 words 1 min read Contents 当然我们在开始测网速之前需要提前下载好依赖的模块 1 pip install speedtest-cli 然后我们开始尝试测试一下网速: 1 2 3 4 5 6 7 8 9 10 from speedtest import Speedtest def Testing_Speed(net): download = net.download() upload = net.upload() print(f'下载速度: {download/(1024*1024)} Mbps') print(f'上传速度: {upload/(1024*1024)} Mbps') print("开始网速的测试 ...") net = Speedtest() Testing_Speed(net) Author 软件开发大郭 LastMod 2022-12-19