Skip to content

Instantly share code, notes, and snippets.

@bitmvr
Last active January 26, 2021 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitmvr/bca0cacf471862f07f5c36ae99d90da3 to your computer and use it in GitHub Desktop.
Save bitmvr/bca0cacf471862f07f5c36ae99d90da3 to your computer and use it in GitHub Desktop.
getParticipantsFromGoogleMeet - Javascript to return a list of all users from a Google Meet Participants
let scrubParticipants = function(participant) {
if ( participant.includes('You') || participant.includes('Presentation')) {
participant = participant.replace('(You)','');
participant = participant.replace('Presentation','');
participant = participant.replace('\n','');
}
return participant;
}
let getParticipants = async function(){
let show_everyone = document.querySelectorAll('div[data-tooltip="Show everyone"]')[0];
show_everyone.click();
await new Promise(r => setTimeout(r, 2000));
let list_of_participants = document.querySelectorAll('div[aria-label="Participants"] div[role="listitem"]');
let participants = [...list_of_participants];
participants = participants.map(participants => participants.innerText);
participants = participants.map(participants => scrubParticipants(participants));
participants = new Set (participants);
participants = [...participants];
let close_button = document.querySelectorAll('button[aria-label="Close"]')[0];
close_button.click();
return JSON.stringify(participants);
}
// To copy to your clipboard
copy(await getParticipants());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment