Hi, friends here i am sharing a little script that can help you to get all unsaved whatsapp numbers from the list of messages from Whatsapp Web. Below are the steps you can follow and easly get all the contacts.

Step 1.

Open up web.whatsapp.com and connect your account by scanning the QR code from your whatsapp mobile app.

Step 2.

Find the list item and copy class name you can do this via right click and inspect element or Ctrl+Shift+i
Check out the screenshot below

Step 3.

Once you get the correct class name you can use it in script below.

var sp = document.getElementById("pane-side");
//change your classname below
var el = document.querySelectorAll("._1MZWu"); 
var  numbs = [];
sp.onscroll = function(){
el.forEach(myFunction);
function myFunction(item, index) {	
  numbs.push(item.innerText.substring(0, item.innerText.indexOf('\n')));
}
};
Paste this script into console like this. And scroll through your whatsapp list

 

 

 

 

 

 

 

 

 

Step 4.

When you finish scroll through all your list on side bar of whatsapp web. you can paste this script to and run it to get the final result.

 

function getresult(){
function onlyUnique(value, index, self) { return self.indexOf(value) === index; }
var unique = numbs.filter( onlyUnique );
var resultstring;
unique.forEach(getresult);
function getresult(item){
resultstring+= item + "\n";
}
console.log(resultstring);
}
Hit enter after paste this script

 

Step 5.

When you done all this you can now get the result by running this function on console
getresult();

After it you will have list of numbers and you can copy all of them like below image.

You can copy all the numbers and paste into excel sheet with 2 columns
names and numbers and than you can import it via google contacts or other platform you want.

 

I hope this will be helpful for you. Please note, you have to scroll through all of your contacts after pasting 1st function. otherwise you will get 15 contacts only.

Watch Video Here for the demo