Created
June 5, 2014 01:24
-
-
Save stevekohls/a409ff1fe471601dc069 to your computer and use it in GitHub Desktop.
This file contains 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 | |
# | |
# WWDC 2014 downloader | |
# | |
# by Steve Kohls @stevekohls | |
# | |
# Adapted from this tweet by @stroughtonsmith: https://twitter.com/stroughtonsmith/status/474059979587338240 | |
# | |
# Downloads the HD videos and PDFs from WWDC 2014 | |
# Creates two files, each with a list of file URLs, and then downloads the files. | |
# Does not overwrite already downloaded files. | |
# | |
# your mileage may vary | |
# no rights reserved | |
# | |
# get the list of HD videos | |
curl https://developer.apple.com/videos/wwdc/2014/ | grep -iIoh 'http.*._hd_.*?dl=1">HD' | sed -e 's/\?dl=1">HD//g' > hd_videos | |
# get the list of PDFs. | |
# note the [^ ] — there was some funky html that gave me problems. quick fix. | |
curl https://developer.apple.com/videos/wwdc/2014/ | grep -iIoh 'http[^ ]*\.pdf?dl=1">PDF' | sed -e 's/\?dl=1">PDF//g' > pdfs | |
# get the files | |
wget -nc -i hd_videos | |
wget -nc -i pdfs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment