Skip to content

Instantly share code, notes, and snippets.

@behdaad
Created January 2, 2020 11:29
Show Gist options
  • Save behdaad/6beeba03baaf50095907d75126abe15e to your computer and use it in GitHub Desktop.
Save behdaad/6beeba03baaf50095907d75126abe15e to your computer and use it in GitHub Desktop.
Export device list from Apple Developer panel
var data = document.querySelectorAll(".infinite-scroll-component .row");
var csvOutput = "Name, Identifier, Type\n"
for (var i = 1; i < data.length; i++) {
let name = data[i].childNodes[0].childNodes[0].textContent;
let identifier = data[i].childNodes[1].childNodes[0].textContent;
let type = data[i].childNodes[2].childNodes[0].textContent;
let device = [name, identifier, type].join(", ") + "\n";
csvOutput += device;
}
console.log(csvOutput);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment