如何在没有403的情况下通过命令行下载文本文件,使用wget? 我正在设置用户代理但仍然获得403:
命令
ubuntu@ip-172-31-44-71:~/Downloads$ wget -O jane-austen.txt --user-agent="Mozilla/5.0 (Windows NT 5.2; rv:2.0.1) Gecko/20100101 Firefox/4.0.1" "http://www.gutenberg.org/files/1342/1342-0.txt"
输出
--2017-02-07 21:10:58-- http://www.gutenberg.org/files/1342/1342-0.txt
Resolving www.gutenberg.org (www.gutenberg.org)... 152.19.134.47, 2610:28:3090:3000:0:bad:cafe:47
Connecting to www.gutenberg.org (www.gutenberg.org)|152.19.134.47|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2017-02-07 21:11:06 ERROR 403: Forbidden.