Wednesday, 16 January 2008

Wget saves mouse clicks...

Today I was visiting a journal web page that listed supplements to an article they published. There were umpteen items to click away at (why don't they have a "download all" button that gives me a gzipped archive??) and I hate that sort of dumb clicking.

I remembered wget can automate this. A quick man wget provided just the right example to do what I wanted:

wget -r -l1 --no-parent

...where this particular example helps me to download the page and the links on that page (-r), but only one link deep (-l1) and not going up in the web site directory tree (--no-parent), and, finally, to only get items that are .mov-files (-A or --accept).

Yes, the next thing I found out was that I didn't have a codec for those Quicktime supplements, but that's another story...

No comments: