Created
April 11, 2011 00:16
-
-
Save mlc/912887 to your computer and use it in GitHub Desktop.
Script to download This American Life episodes.
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
#!/bin/sh | |
# | |
# This script downloads episodes of This American Life. It is useful | |
# because it downloads from the server normally use for streaming | |
# episodes in the flash player, so you can downoad episodes that are | |
# newer or older than the one currently available for podcast | |
# listening. | |
# | |
if [[ $# -ne 1 ]]; then | |
echo "Please provide exactly one argument." >&2 | |
exit 1 | |
fi | |
case $1 in | |
[0-9] | [0-9][0-9] | [0-9][0-9][0-9]) | |
i=$1 | |
;; | |
*) | |
echo "Argument must be numeric." >&2 | |
exit 1 | |
;; | |
esac | |
set -ex | |
exec curl -OvL http://audio.thisamericanlife.org/jomamashouse/ismymamashouse/${i}.mp3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am not the first to discover this, of course.