赞
踩
在网页上下载文件时需要输入用户名密码
wget https://username:password@URL
网上回答大多是说命令中加入 --no-check-certificate,但试了没有成功
wget --no-check-certificate https://username:password@URL
另外一种解决办法是不用wget 换curl -O 命令下载,但是不知道为什么下载下来文件只有1k
curl -u username:password -O -L URL
最后看到有人说是版本的问题1.14之前都会有这个问题,于是https://eternallybored.org/misc/wget/
下载了1.19版的wget,再试发现不报错了
新的问题是出现了Username/Password Authentication Failed,用户名密码验证失败,各种试之后发现使用指定用户名密码语句之后成功了!!
wget --http-user=username --http-password=password URL
参考链接:https://www.iyunv.com/thread-134807-1-1.html
https://www.cnblogs.com/inteliot/archive/2012/06/01/2530843.html
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。