Skip to content

Instantly share code, notes, and snippets.

@fiskhandlarn
Last active April 22, 2020 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fiskhandlarn/3a1fb0a1747b1b23885432659ae17881 to your computer and use it in GitHub Desktop.
Save fiskhandlarn/3a1fb0a1747b1b23885432659ae17881 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ $# -gt 0 ]
then
for url in "$@"
do
echo "Processing $url ..."
files=$(wget -q -O- $url | grep -o '<enclosure [^>]*url="[^"]*' | grep -o '[^"]*$')
while IFS= read -r file; do
echo "Downloading $file"
wget -c $file
done <<< "$files"
echo ""
done
else
echo "Usage: podcastdl.sh [URL] ..."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment