简体   繁体   English

如何使用Wget下载网页?

[英]How can I download a web page by using Wget?

Firstly, i want download the web page: http://acm.sgu.ru/problem.php?contest=0&problem=161 I try to use the command: 首先,我要下载网页: http : //acm.sgu.ru/problem.php?contest=0&problem=161我尝试使用以下命令:

wget -o 161.html http://acm.sgu.ru/problem.php?contest=0&problem=161

But it not work! 但这行不通! Anyone help me ? 有人帮我吗?

  1. The URL you are providing to wget contains characters that have special meaning in the shell ( & ), therefore you have to escape them by putting them inside single quotes. 您提供给wget的URL包含在shell( & )中具有特殊含义的字符,因此您必须通过将其放在单引号中来对其进行转义。

  2. Option -o file is used to log all messages to the provided file. 选项-o file用于将所有消息记录到提供的文件中。

    If you want the page to written to the provided file use option -O file (capital O ). 如果要将页面写入提供的文件,请使用-O file (大写O )选项。

Try: 尝试:

wget -O 161.html 'http://acm.sgu.ru/problem.php?contest=0&problem=161'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM