我想找到下载URL的最新版本的Cura现在它是(https://github.com/Ultimaker/Cura/releases/download/5.2.1/Ultimaker-Cura-5.2.1-win64.exe),我已经写了(Invoke-WebRequest -Uri "https://ultimaker.com/software/ultimaker-cura").innerHTML -match "(https*.exe)"
我尝试了.innerHTML或usebasicparsing或Invoke-Restmethod,我找不到它,有人能帮我找到它吗?谢谢提前
2条答案
按热度按时间8i9zcol21#
我建议你使用GitHub的发布API来找到软件的最新版本。
请注意,我在这里应用
Where-Object
是为了只过滤掉win64
,因为一个发行版可以包含针对不同平台的二进制文件。然后,您可以使用
browser_download_url
属性获取下载url,您可以将其与Invoke-WebRequest
一起使用来下载它o2g1uqev2#
日安
当我尝试从Powershell下载文件时,我使用以下命令:
这是一种使用.Net下载文件的简单方法