Created
June 7, 2017 23:01
-
-
Save jfahrenkrug/22b5cad4553790089a659b61aa41231a to your computer and use it in GitHub Desktop.
Extract the WWDC 2017 Sample Code URL from the sessions page. Just paste it into the JS console on https://developer.apple.com/wwdc/schedule/
This file contains hidden or 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
$.getJSON( "https://devimages-cdn.apple.com/wwdc-services/h8a19f8f/049CCC2F-0D8A-4F7D-BAB9-2D8F5BAA7030/contents.json", function( data ) { | |
var items = []; | |
$.each( data.contents, function( key, val ) { | |
if (val.type == 'Session' && val.eventId == 'wwdc2017' && val.related && val.related.resources) { | |
$.each(val.related.resources, function (resKey, resId) { | |
var resource = data.resources[resId] | |
if (resource && resource['resource_type'] == 'samplecode') { | |
items.push(resource); | |
} | |
}); | |
} | |
}); | |
console.log(items); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment