Created
March 17, 2022 12:53
-
-
Save eliocapelati/39c3c45bf65cf11fc1c7a74d8001f717 to your computer and use it in GitHub Desktop.
Download audio files of book IELTS, 4th Edition freely available on: https://barronsbooks.com/tp/ielts/audio/index_d83rd2.html
This file contains 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
#!/usr/bin/env bash | |
## Download audio files of book: | |
## IELTS, 4th Edition | |
## freely available on: https://barronsbooks.com/tp/ielts/audio/index_d83rd2.html | |
# https://barronsbooks.com/tp/ielts/audio/d83rd2/Track%2001.mp3 | |
download () { | |
local BASE_URL="https://barronsbooks.com/tp/ielts/audio/d83rd2/" | |
local INDEX=$(printf "%02d" $1) | |
local FILE_NAME="Track%20$INDEX.mp3" | |
local OUTPUT_FILE_NAME="Track $INDEX.mp3" | |
echo "Start downloading: $BASE_URL$FILE_NAME" | |
curl $(echo "$BASE_URL$FILE_NAME") --output "$OUTPUT_FILE_NAME" --silent | |
echo "Complete download of $(pwd)/$OUTPUT_FILE_NAME" | |
} | |
for item in {1..26}; do | |
download $item; | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment