Download All WAV, MP3, etc. From a Site

Aug
26
2005

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 on this post

Feedback is always welcome. Read some from other folks or leave your own below. Just keep things civil and remember that what you post lives on in public. Forever.

Thanks,
J

2 Responses to “Download All WAV, MP3, etc. From a Site”

  1. David Says:

    Very nice, thanks for this!

  2. Artem Says:

    Thanks!

Leave Your Own Comment

By submitting a comment, you agree to license it under the terms of the Creative Commons Attribution license.

People who post comments get the added benefit of visiting the site without advertising.

© 2003-2008 J Wynia. All original content is licensed under the terms of the Creative Commons Attribution license unless otherwise noted. Content from other sources is licensed under its original terms.