Skip to content

Instantly share code, notes, and snippets.

@nonsleepr
Created December 11, 2013 11:38
Show Gist options
  • Save nonsleepr/7908929 to your computer and use it in GitHub Desktop.
Save nonsleepr/7908929 to your computer and use it in GitHub Desktop.
Script to download MIT's MAS.531 (http://mitglass.com/) course videos
#!/usr/bin/bash
# Requires:
# - xmlstarlet
# - gawk
# - wget
# - xargs
wget -qO - http://techtv.mit.edu/collections/compu-camera/videos.rss | \
xmlstarlet sel -t -m '//item' -v 'link' -o ',' -v 'enclosure/@url' -n | \
gawk -F, '{gsub(/^.*\//,"",$1);print $1".mp4 "$2}' | \
xargs -t -n2 wget -O
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment