Tutorial Example

A Simple Way to Change the User Agent in Wget – Wget Tips

Why we shoud set the user agent when using wget?

The reason is some websites will detect the http header, if there is not user-agent in http request header, websites will refuse connection.

How to get the value of user-agent?

The most simplest way is opening your browser and opening a website.

Press F12

You will find user-agent value like this:

How to set user-agent in wget?

If you want to use wget in win 10, you can view:

Best Practice to Use wget in Windows 10

Follow code below:

wget --user-agent="Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" "https://www.outlook.com"

The key is use –user-agent parameter in wget.