【发布时间】:2018-11-13 17:46:30
【问题描述】:
我正在使用以下 wget 行来下载数据集。
wget -e robots=off -m -np -R .html,.tmp -nH --cut-dirs=3 \
https://ladsweb.modaps.eosdis.nasa.gov/archive/orders/50672578/ \
--header "Authorization: Bearer <your appKey>" -P <target dir>
现在,我想从同一个 URL 下载多个文件夹(即https://ladsweb.modaps.eosdis.nasa.gov/archive/orders/50672578/;https://ladsweb.modaps.eosdis.nasa.gov/archive/orders/50672579/;https://ladsweb.modaps.eosdis.nasa.gov/archive/orders/50672580/ 等)
我在 shell 脚本中使用 for 循环,如下所示:
for i in 50672578 50672579 50672580
do
wget -e robots=off -m -np -R .html,.tmp -nH --cut-dirs=3 \
https://ladsweb.modaps.eosdis.nasa.gov/archive/orders/$i/ \
--header "Authorization: Bearer <your appKey>" -P <target dir>
done
但这给了我以下错误:
已发送代理请求,等待响应... 400 Bad Request 2018-11-12 12:18:34 错误 400:错误请求。
单独它工作正常,但不是通过 for 循环。
请指出我的错误。
提前谢谢你
【问题讨论】:
-
你能用“-v”运行
wget并在这里发布输出吗?