我正在寻找一种使用PowerShell命令从github下载特定文件的方法。
我尝试下载的文件的URL如下:https : //github.com/soulcurrymedia/twitter-emotion-recognition/blob/master/models/allowed-chars.pkl
我尝试了以下操作,但它已下载了html脚本而不是实际文件
$url = "https://github.com/soulcurrymedia/twitter-emotion-recognition/blob/master/models/allowed-chars.pkl"
$output = "C:\code\queues\models\allowed-chars.pkl"
Invoke-WebRequest -Uri $url -OutFile $output
我是PowerShell的新手,所以将不胜感激。
您需要使用直接下载链接才能正常工作。在这种情况下,链接为:
https://github.com/soulcurrymedia/twitter-emotion-recognition/raw/master/models/allowed-chars.pkl
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句