pod_grabber/pod_grabber.sh
2020-09-24 06:55:59 -04:00

24 lines
427 B
Bash
Executable File

#!/bin/bash
#Download podcasts from rss feeds.
target_url=$1
function grab_podcast () {
echo "Getting Feed..."
wget -q $target_url -O -|grep ".mp3"|sed -e 's/<[^>]*>//g'>.holding_file.txt
echo "Getting Podcast..."
wget -i .holding_file.txt
rm .holding_file.txt
echo "Download Finished."
}
if [ "$1" != "" ]
then
grab_podcast
elif [ "$1" == "" ]
then
printf "No input given. Please supply a URL\nExiting.\n"
fi
exit