Created
July 18, 2012 15:46
-
-
Save zealot128/3137049 to your computer and use it in GitHub Desktop.
Download Media Podcasts (RSS-Feed with audio/Video in enclosure)
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 | |
# Run with podcast-download.sh http://linktofeed.xml | |
# should work in BusyBox (my NAS is an ARM Linux with busybox) | |
set -e # exit when one line has error | |
filename="/tmp/rssdwn-$(date +%s)" | |
curl $1 2> /dev/null | grep enclosure | sed "s/.*\(http[^\"\?]*\).*/\1/" > $filename | |
echo "Found $(wc -l $filename) Links, start downloading to pwd" | |
# wget -nc will only download new episodes | |
wget -i $filename -nc -nv | |
rm $filename | |
echo "DONE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment