wget和htaccess:仅限用户名

Emi*_*mov 7 linux ubuntu wget

我用Google搜索了如何使用ubuntu中的终端下载图像.我找到了我需要的东西,但在服务器上,用.htaccess保护,没有密码.同

wget admin@http://server.com/filename.jpg

它返回:没有到主机的路由.当我设置密码并输入时

wget admin:password@http://server.com/filename.jpg

一切安好.但是我不允许在服务器上使用密码.如何解决它,寻找路线?

And*_*tti 23

更容易:

wget --user="username" --password="password" http://xxxx.yy/filename.xxx
Run Code Online (Sandbox Code Playgroud)


Mar*_*c B 6

尝试

wget --user=admin http://server.com/filename.jpg
Run Code Online (Sandbox Code Playgroud)

代替.

或者,

wget http://admin:@server.com/filename.jpg
Run Code Online (Sandbox Code Playgroud)

可能会改变.

您的语法实际上是错误的,因为它:

wget http://user:pass@host/file
Run Code Online (Sandbox Code Playgroud)

您的用户名在网址之外,并被视为主机名.