Skip to content

Instantly share code, notes, and snippets.

@hdurdle
Created November 12, 2015 20:58
Show Gist options
  • Save hdurdle/4614ae0638c6475dd21b to your computer and use it in GitHub Desktop.
Save hdurdle/4614ae0638c6475dd21b to your computer and use it in GitHub Desktop.
# Download the new Apple TV aerial videos
Import-Module BitsTransfer
$sourceurl = "http://a1.phobos.apple.com/us/r1000/000/Features/atv/AutumnResources/videos/entries.json"
$data = Invoke-WebRequest -Uri $sourceurl | ConvertFrom-Json
foreach ($vid in $data) {
foreach($asset in $vid.assets) {
$url = $asset.url
$filename = "$($asset.accessibilityLabel)_$($asset.id).mov"
$filename
Start-BitsTransfer -Source $url -Destination $filename
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment