Skip to content

Instantly share code, notes, and snippets.

@davertay
Created June 4, 2014 22:28
Show Gist options
  • Save davertay/e8194e266554661202ec to your computer and use it in GitHub Desktop.
Save davertay/e8194e266554661202ec to your computer and use it in GitHub Desktop.
Fetch all the WWDC videos as they appear
#!/bin/bash
# Fetch every video
DST=~/Public/WWDC/2014
if [ ! -d "${DST}" ]
then
exit 1
fi
cd "${DST}"
date >> curl.log
# HD
curl -s https://developer.apple.com/videos/wwdc/2014/ | grep -iIoh 'http.*._hd_.*dl=1">HD' | sed -e 's/\?dl=1">HD//g' | xargs -I % curl -O -C - % 2>&1 >> curl.log
# SD
# curl -s https://developer.apple.com/videos/wwdc/2014/ | grep -iIoh '|.*http.*._sd_.*dl=1">SD' | sed -e 's/|.*http/http/' -e 's/\?dl=1">SD//g' | xargs -I % curl -O -C - % 2>&1 >> curl.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment