Skip to content

Instantly share code, notes, and snippets.

@DSchau
Last active July 19, 2017 14:08
Show Gist options
  • Save DSchau/0225df94279bc80a32a3af490144862a to your computer and use it in GitHub Desktop.
Save DSchau/0225df94279bc80a32a3af490144862a to your computer and use it in GitHub Desktop.
Get all users from google play developer console
(function getAllUsers() {
const table = Array.from(document.querySelectorAll('table'))
.filter(el => el.className.length > 0)
.pop();
if (!table) {
throw new Error('Unable to find a valid table. Perhaps Google Play Developer tweaked their markup?');
}
const users = Array.from(table.querySelectorAll('tr'))
.map(tr => tr.firstChild.innerText.replace(/\n/, ''))
.filter(name => name && name !== 'Email address');
return JSON.stringify({
to: users
}, null, 2);
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment