Spaces:
Sleeping
Sleeping
Download debug_speedtest.py from duqing026/net-speed-pro: direct link, hf CLI and curl.
- Browser
- Download file 317 Bytes
-
https://huggingface.co/spaces/duqing026/net-speed-pro/resolve/main/debug_speedtest.py
- Command line
-
hf download hf://spaces/duqing026/net-speed-pro/debug_speedtest.py
-
curl -L -o debug_speedtest.py https://huggingface.co/spaces/duqing026/net-speed-pro/resolve/main/debug_speedtest.py
317 Bytes
| import speedtest | |
| import sys | |
| print("Testing speedtest-cli...") | |
| try: | |
| st = speedtest.Speedtest(secure=True) | |
| print("Speedtest initialized.") | |
| print("Getting best server...") | |
| st.get_best_server() | |
| print(f"Best server: {st.best['host']}") | |
| except Exception as e: | |
| print(f"Error: {e}") | |
| sys.exit(1) | |