download openBLAS from SourceForge using PowerShell

461 Views Asked by At

I would like to use PowerShell to download openBLAS from SourceForge. My problem is that the PS documentation I have read always refers to a specific file name, but, when I submit that request, SF redirects it to /download, and something happens, but I don't get what I am looking for. Here is the current code:

$url = 'https://sourceforge.net/projects/openblas/files/v0.3.6/OpenBLAS-0.3.6-x64.zip'
# $url = 'https://sourceforge.net/projects/openblas/files/v0.3.6/OpenBLAS-0.3.6-x64.zip/download'
$output = 'C:\BLAS\OpenBLAS-0.3.6-x64.zip'
Invoke-WebRequest $url -OutFile $output
1

There are 1 best solutions below

1
tjorchrt On

It works for me in Windows 10 PowerShell 5.1.

Invoke-WebRequest -Uri $url -OutFile $path -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::FireFox

source