Skip to content

Instantly share code, notes, and snippets.

@creaoy
Forked from larsparendt/extract-testflight.js
Created November 30, 2015 21:11
Show Gist options
  • Save creaoy/80d1092283a5d0fa1070 to your computer and use it in GitHub Desktop.
Save creaoy/80d1092283a5d0fa1070 to your computer and use it in GitHub Desktop.
Extract TestFlight user email addresses from iTunes Connect
//Make sure you scroll down to get all data loaded
var text = '';
$('.col-email').each(function(index,el) {
if (index == 0) {
text = 'Email, First Name, Last Name\n';
}
else {
//Email
text = text + $.trim($(el).find("a").text()) + ',';
//First Name
text = text + $.trim($($($($('.col-name')[index]).find("span")[0]).find("span")[0]).text()) + ',';
//Last Name
text = text + $.trim($($($($('.col-name')[index]).find("span")[0]).find("span")[1]).text()) + ',' + '\n';
}
});
var a = document.createElement("a");
var file = new Blob([text], {type: 'text/csv'});
a.href = URL.createObjectURL(file);
a.download = name; a.click();
@NikhilP97
Copy link

This code didn't work for me beacuse there was no HTML element with the class name '.col-email'
I've written a script that downloads the testflight table details in a CSV file in a github gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment