Skip to content

Instantly share code, notes, and snippets.

@dbeley
Last active January 18, 2021 23:37
Show Gist options
  • Save dbeley/b53573313741bceecbb86686cb08388b to your computer and use it in GitHub Desktop.
Save dbeley/b53573313741bceecbb86686cb08388b to your computer and use it in GitHub Desktop.
Download all audio files from a list of URLs.
#!/usr/bin/env bash
set -eEu -o pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd -P)"
# URLs.txt is a text file containing one URL per line
for URL in `cat "$DIR/URLs.txt"`; do
# you can add other extensions
wget -r -nd --accept=mp3,MP3 -k -l 1 --show-progress --progress=bar:force:noscroll -e robots=off --span-hosts "$URL" -q
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment