This will download the members of group with their phone number, whatsapp name and if contact is stored on phone, it will export the name as well.
Go to web.whatsapp.com. Copy-paste the code into your browser console.
(async () => {
const contactFinder = new ContactFinder("YOUR GROUP SEARCH STRING OR GROUP TITLE");
const members = await contactFinder.getGroupMembers(); // This will return a JS Map Object
console.log(members);
// OR
await contactFinder.downloadMembersAsCSV(); // This will download the contacts as CSV
})();
This code uses data stored in indexDB by WhatsApp and search through indexDb collections to collect the required data
Side Note : This code snippet is shared only for educational purpose and the code might not be maintained anymore. Developer is not responsible for any Privacy/Security voilations. Also no data is being sent to anywhere, everything is stored and fetched from local browser tab.