wget无法下载完整文件

来源:互联网 发布:手机淘宝怎么摇一摇 编辑:程序博客网 时间:2024/06/10 12:33

无法使用wget完整下载 https://jazz.net/downloads/rational-team-concert/releases/5.0/RTC-scmTools-Linux64-5.0.zip。


wget https://jazz.net/downloads/rational-team-concert/releases/5.0/RTC -scmTools-Linux64-5.0.zip --user=user --password=password


Output:

--2015-04-13 14:49:29--  https://jazz.net/downloads/rational-team-concert/releases/5.0/RTC-scmTools-Linux64-5.0.zip
Resolving jazz.net (jazz.net)... 199.246.40.51
Connecting to jazz.net (jazz.net)|199.246.40.51|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘RTC-scmTools-Linux64-5.0.zip.4’

    [  <=>                               ] 20,017      80.3KB/s   in 0.2s

2015-04-13 14:49:30 (80.3 KB/s) - ‘RTC-scmTools-Linux64-5.0.zip.4’ saved [20017]


只下载到了一个几十k的HTML page。实际上Length里那句[text/html]可能已经是个提示了。


Reason:

”It is an HTML "error message", 44k in size, telling the user that there's no valid login and that you should provide credentials (because there's no session cookie).

@LinuxLearner: the --user and --password options only work with FTP or HTTP Basic Authentication, but not with Form-based (eg: input boxes) / session cookie authentication. For that you'll have to resort to screen-scraping, or create a file with a valid cookie, and supply that via the--load-cookiesparameter.“

而我download到的这个HTML里就是login form。

Reference link:http://www.unix.com/ubuntu/151893-wget-dont-download-complete-file-2.html?s=0280ab548603a68541f2199d78648d17



0 0
原创粉丝点击