Last active
July 19, 2017 14:08
-
-
Save DSchau/0225df94279bc80a32a3af490144862a to your computer and use it in GitHub Desktop.
Get all users from google play developer console
This file contains 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
(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