How do I execute "wget" to archive whole sites for offline browsing

I ran across this post:

<If you find some good online sites, you can use "wget" to archive the whole site to your machine for offline browsing. I use the following:

<alias getsite='wget -k -r -N --random-wait -np'

I would like to try this offline browsing suggestionbut I don't understand how to implement this.

I posted this to the orriginal sender but haven't gotten a response, being impatient...Could anyone give me a step by step idiot proof intructional version of this?

iMac PowerPC G4 800 mhz 1GBSDRAM 17" Flatpanel, Mac OS X (10.4.8), Seagate external Firewire/USB HD's:250GB & 500GB<>Sony DSC-V3 & DSC-S8 Cybershot

Posted on Jan 16, 2007 12:41 AM

Reply
5 replies

Jan 16, 2007 1:22 AM in response to don.kilometro

I've never used it myself, but you can download wget from here:
http://www.versiontracker.com/dyn/moreinfo/macosx/13923&vid=59439

And you can obtain its documentation from here:
http://www.gnu.org/software/wget/index.html#documentation

To run wget, it looks like you need to run it from the Terminal program as it doesn't appear to be interactive.

Good luck

Bob

PS: FWIW, macs ship with curl which appears to do the same thing. You can get documentation about curl by starting Terminal and typing "man curl"

Jan 16, 2007 7:05 AM in response to Bob Lang1

Bob, Thanks for the links!

<To run wget, it looks like you need to run it from the Terminal program as it doesn't appear to be interactive.
<PS: FWIW, macs ship with curl which appears to do the same thing. You can get documentation about curl by starting Terminal and typing "man curl"

I wasn't aware of (or familiar with) the Terminal program until your post, so I don't know where to type>"man curl". I'ld like to give it a shot just to see where it goes.

Jan 16, 2007 7:43 AM in response to don.kilometro

Hi don

The Terminal program can normally be found in the Applications/Utilities folder. When it opens, it gives you a Unix "shell" into which you can type Unix commands (like "man curl" plus return). The Terminal gives you the best possible control over your computer, but at a cost of having to learn Unix shell commands. If you get hooked on it, then any book on Unix will get you started, plus there are numerous web sites, and there's a specialist Unix forum in these discussions who will give you more detailed help.

Bob

Jan 19, 2007 7:33 AM in response to don.kilometro

That sure sounds like my post. I was going to respond with my alias:

alias getsite='wget -k -r -N --random-wait -np'

Which looks a whole lot like yours.

Yes. This is definitely in the Terminal. It is located in /Applications/Utilities.
The alias command above is a line in my .bash_profile file in my home directory. It cans all sorts of similar commands to do cool stuff in the terminal. Once you add the above line to your .bash_profile file, open a new terminal window, and type getsite http://www.apple.com and sit back and let it work.

The other day I was travelling and had a very slow connection. I had to adjust the command like this ' getsite --reject=bz2,mov,gz,dmg,swf http://osxbook.com/book/bonus/' so that is wouldn't try to download huge files.

You don't want to use curl. The curl program is more low-level and is more suited to software development and testing. If you are just starting to learn the terminal, use wget for now. Later, when you learn about standard output redirection, you can try curl.

I always do 'cd ~/Sites' before using wget. Then, I can just go to 'http://mymachine.local/~jdaniel/www.apple.com' to view archived sites.

Feb 2, 2007 6:14 PM in response to don.kilometro

A bit off topic, but you might want to try httrack. Works great for mirroring sites for offline browsing. Loads of options for downloading sites. It is command-line only for Mac OS X but very well documented and easy to use. It can be used interactively in the terminal by typing 'httrack' without any parameters.

http://www.httrack.com

MacBook Pro 15" 2.16GHz Mac OS X (10.4.8)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I execute "wget" to archive whole sites for offline browsing

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.