How do I get "wget" for Snow Leopard?

There's no wget command. How do I get it?


Alternatively, if you don't need wget specifically, Snow Leopard does come with curl which does many of the same things.

E.g., fetching your flair via wget:

wget http://apple.stackexchange.com/users/flair/2726.png

vs. fetching it with curl:

curl -O http://apple.stackexchange.com/users/flair/2726.png

Notably lacking from curl is wget's --mirror option, but it does have nifty fetching with patterns, which handles many of the same problems:

# Fetch flair images for users 2726 through 2730
curl -O http://apple.stackexchange.com/users/flair/[2726-2730].png

You will need to install Xcode with Unix Dev Support, then you can download and compile the source, or try macports, or homebrew.

$ brew install wget

$ sudo port install wget

Or you could try a graphical form which includes wget, like http://www.macupdate.com/app/mac/24787/cocoawget


To expand on Michael Granger's answer: curl (included on all Snow Leopard installs) is really quite powerful, and can do a lot of what wget does (and a number of things it doesn't).

But, as noted on the curl FAQ:

1.3 What is curl not?

Curl is not a wget clone. That is a common misconception. Never, during curl's development, have we intended curl to replace wget or compete on its market. Curl is targeted at single-shot file transfers.

Curl is not a web site mirroring program. If you want to use curl to mirror something: fine, go ahead and write a script that wraps around curl to make it reality (like curlmirror.pl does).

...

(For reference, here's that curlmirror.pl script)