简体   繁体   中英

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:

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.

  2. Option -o file is used to log all messages to the provided file.

    If you want the page to written to the provided file use option -O file (capital O ).

Try:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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