Skip to content

Instantly share code, notes, and snippets.

@zealot128
Created July 18, 2012 15:46
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zealot128/3137049 to your computer and use it in GitHub Desktop.
Save zealot128/3137049 to your computer and use it in GitHub Desktop.
Download Media Podcasts (RSS-Feed with audio/Video in enclosure)
#!/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