qq_40621854 2018-12-06 15:43
浏览 3392

windows wget没办法下载一个网页内的所有文件,怎么办?

图片说明如图,我要批量下载这个网页目录下的所有文件。用了下面这段代码:

wget -r -nH --cut-dirs 2 --restrict-file-names=nocontrol -P F:\data --http-user=XXXX --http-passwd=XXXX https://n5eil01u.ecs.nsidc.org/SMAP/SPL2SMAP_S.002/2015.03.31/

(由于隐私,用户名和密码我用XXXX代替)

执行代码后过程如下:

--2018-12-06 23:39:12--  https://urs.earthdata.nasa.gov/oauth/authorize?app_type=401&client_id=_JLuwMHxb2xX6NwYTb4dRA&response_type=code&redirect_uri=https%3A%2F%2Fn5eil01u.ecs.nsidc.org%2FOPS%2Fredirect&state=aHR0cDovL241ZWlsMDF1LmVjcy5uc2lkYy5vcmcvU01BUC9TUEwyU01BUF9TLjAwMi8yMDE1LjAzLjMxLw
Resolving urs.earthdata.nasa.gov (urs.earthdata.nasa.gov)... 2001:4d0:241a:4081::89, 198.118.243.33
Connecting to urs.earthdata.nasa.gov (urs.earthdata.nasa.gov)|2001:4d0:241a:4081::89|:443... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Authentication selected: Basic realm="Please enter your Earthdata Login credentials. If you do not have a Earthdata Login, create one at https://urs.earthdata.nasa.gov//users/new"
Reusing existing connection to [urs.earthdata.nasa.gov]:443.
HTTP request sent, awaiting response... 302 Found
Location: https://n5eil01u.ecs.nsidc.org/OPS/redirect?code=b01004c779d377e755a8baf424ff2a756a0d61469640e0175dd9a42b92100c71&state=aHR0cDovL241ZWlsMDF1LmVjcy5uc2lkYy5vcmcvU01BUC9TUEwyU01BUF9TLjAwMi8yMDE1LjAzLjMxLw [following]
--2018-12-06 23:39:14--  https://n5eil01u.ecs.nsidc.org/OPS/redirect?code=b01004c779d377e755a8baf424ff2a756a0d61469640e0175dd9a42b92100c71&state=aHR0cDovL241ZWlsMDF1LmVjcy5uc2lkYy5vcmcvU01BUC9TUEwyU01BUF9TLjAwMi8yMDE1LjAzLjMxLw
Connecting to n5eil01u.ecs.nsidc.org (n5eil01u.ecs.nsidc.org)|128.138.97.102|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://n5eil01u.ecs.nsidc.org/SMAP/SPL2SMAP_S.002/2015.03.31/ [following]
--2018-12-06 23:39:16--  https://n5eil01u.ecs.nsidc.org/SMAP/SPL2SMAP_S.002/2015.03.31/
Connecting to n5eil01u.ecs.nsidc.org (n5eil01u.ecs.nsidc.org)|128.138.97.102|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: 'F:/data/2015.03.31/index.html'

2015.03.31/index.html             [   <=>                                            ]  29.25K  49.5KB/s    in 0.6s

2018-12-06 23:39:17 (49.5 KB/s) - 'F:/data/2015.03.31/index.html' saved [29950]

FINISHED --2018-12-06 23:39:17--
Total wall clock time: 6.4s
Downloaded: 1 files, 29K in 0.6s (49.5 KB/s)

最终仅仅只是下了个Index文件。

我想问一下这里面是哪里出错了?

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 如何处理复杂数据表格的除法运算
    • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
    • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
    • ¥200 uniapp长期运行卡死问题解决
    • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
    • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
    • ¥15 乘性高斯噪声在深度学习网络中的应用
    • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
    • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
    • ¥15 C++ 头文件/宏冲突问题解决