Created
April 23, 2015 17:25
-
-
Save rtluckie/7ca0b54e0ae587ee984a to your computer and use it in GitHub Desktop.
Download all samples from audiocheck.net
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BASE_DIR="audiocheck.net" | |
mkdir ${BASE_DIR} && cd ${BASE_DIR} && \ | |
for PAGE in $(curl http://www.audiocheck.net/soundtestsaudiotesttones_index.php | grep .php | sed 's|.*a href="\.\/\(.*.php\).*|\1|g' | grep php$); do | |
DIRNAME=$(echo ${PAGE} | sed 's|[a-z0-9]*_\(.*\)\.php|\1|g') | |
echo "Downloading ${DIRNAME}" | |
mkdir $(pwd)/${DIRNAME} | |
for FILE in $(curl http://www.audiocheck.net/${PAGE} | grep download.php | sed 's|.*<A HREF="download.php?filename=\([^\"]*\).*|\1|g'); do | |
FILE_NAME=$(echo $FILE | sed 's|Audio/audiocheck.net_\(.*\)|\1|g') | |
DOWNLOAD_TARGET="http://www.audiocheck.net/download.php?filename=${FILE}" | |
DOWNLOAD_PATH=$(pwd)/${DIRNAME}/${FILE_NAME} | |
echo "Downloading ${DOWNLOAD_TARGET} to ${DOWNLOAD_PATH}" | |
curl -o $(pwd)/${DIRNAME}/${FILE_NAME} ${DOWNLOAD_TARGET} | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment