【发布时间】:2017-10-17 08:24:34
【问题描述】:
我目前正在使用以下命令从站点检索数据:
wget http://www.example.com --user=joe --password=schmoe --auth-no-challenge
我将其扩展为递归,但是,我的理解是这将在每个请求上重新发送 HTTP Auth 凭据。
因此,是否可以运行一次基本 HTTP 身份验证,捕获 cookie,然后使用这些 cookie 触发递归加载?
这似乎不起作用:
wget --save-cookies=cookies.txt --user=joe --password=schmoe --auth-no-challenge http://www.example.com
接着是:
wget --load-cookies=cookies.txt -r -p http://www.example.com/pages.html
【问题讨论】:
标签: linux shell authentication wget