Download All WAV, MP3, etc. From a Site

Originally published: 08/2005 by J Wynia

Speaking of .bat wrappers and wget, I recently started using a script I based on one from this article. I was using it to download the sound effects cited as being part of Leo Laporte's library of SFX and figured I'd post it.

I modified it to handle a filetype and URL as inputs, put it in my .bat "holding pen" and now can grab all of a given filetype from a URL easily.

Here's the contents of the filefetch.bat file (see the article for explanations of the switches):

wget -r -l1 -H -t1 -nd -N -np -w5 -A.%1 -erobots=off %2

It can be run like this:


filefetch mp3 http://sitename

Run this from the directory you want the mp3's downloaded to. The first argument is the file extension, so using mp3, gif, jpg, png, avi, etc. The second is the URL to start from. Make sure you pay attention to the -w5 setting, which spaces out your requests by 5 seconds. You only want the files, not to hammer the server into oblivion.

Comments

David on 8/26/2005
Very nice, thanks for this!
Artem on 3/11/2006
Thanks!
blog comments powered by Disqus
Or, browse the archives.
© 2003- 2014 J Wynia. Very Few Rights Reserved. This article is licensed under the terms of the Creative Commons Attribution License. Quoted content or content included from others is not subject to that license and defaults to normal copyright.