speedtest-cli
speedtest-cli copied to clipboard
403 error fix
Fixing the 403 error by making all requests use HTTPS instead of HTTP. Also removing the --secure flag as it's now enabled by default.
Please merge as the tool is unusable at the moment
This version doesn't work for me
This version doesn't work for me
Do you have any specific error?
https://github.com/sivel/speedtest-cli/pull/788#issuecomment-1281859178
no on Linux Debian
no on Linux Debian
Yes but can you try it on Windows?
I have to modify the first line with "#! python3" for the script run, but I still get the error :
Can confirm that on linux (arch). I was originally getting this error until I provided the --secure flag.
I'm pretty sure if you're connecting to speedtest.net then the HTTPS part should be working.
Where do you provide the '--secure' flag? I'm running speedtest.py through curl. And every time I I try to pass the '--secure' flag to the script in the url, curl gripes at me about it being an unknown option. ([...]/master/speedtest.py --secure | python3 -) Or can you not pass options to the script when running as a url?
Where do you provide the '--secure' flag? I'm running speedtest.py through curl. And every time I I try to pass the '--secure' flag to the script in the url, curl gripes at me about it being an unknown option. ([...]/master/speedtest.py --secure | python3 -) Or can you not pass options to the script when running as a url?
You're just simply using curl to download the file from GitHub and then telling python to read the contents of the file through stdin using the - after python. You can provide any arguments you want, specifically to the python script, after the - argument like this. Again think of the dash as you telling python that instead of reading from a file on the disk just read from stdin, which in this case you're piping stdout of curl into stdin of python. You might already know this, but just wanted to clarify.
curl [...]master/speedtest.py | python3 - --secure
Although, I would personally just download the file or use pip to install it.
Thank you; I'm kinda new to working with curl like this, (or really in much of any capacity) so, I wasn't sure.
I have speedtest-cli 2.1.3, which I run on Linux (Mint) and occasionally I see the following.
Retrieving speedtest.net configuration...
Cannot retrieve speedtest configuration
ERROR: HTTP Error 403: Forbidden
I am unsure what workaround, if any, this page (the current webpage) is suggesting.
@LinuxOnTheDesktop - just run it with the "secure" flag and everything will be good. Provider finally starts blocking HTTP requests and looks like most of their servers allowing only HTTPS protocol:
$ speedtest-cli --secure
just run it with the "secure" flag and everything will be good.
Right. Thank you. Will do.
Provider finally starts blocking HTTP requests and looks like most of their servers allowing only HTTPS protocol
Yet me clarify that, in case someone else comes across it and has trouble understanding it. So: the servers that provide the speed tests are blocking speedtest-cli (or rather, in my experience: blocking it sometimes) because (by default, i.e. without --secure
) speedtest-cli uses HTTP rather than HTTPS.
i prefer #800 for the --insecure
flag