Last active
April 22, 2020 08:31
-
-
Save fiskhandlarn/3a1fb0a1747b1b23885432659ae17881 to your computer and use it in GitHub Desktop.
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
#!/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