Created
January 6, 2020 11:36
-
-
Save Aminadav/8d863f53b9ded9b16f52a835fa8b22fb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var list=document.querySelector('.copyable-area').querySelectorAll('.X7YrQ') | |
var ar=[]; | |
for(let i=0;i<list.length;i++) { | |
var friend=list[i] | |
var phone=friend.querySelector('[tabindex] > div >div:nth-child(2) > div').textContent | |
.replace('+972','0').replace(/[ \-]/g,'') | |
try{ | |
var image=friend.querySelector('img').src | |
} | |
catch (err) { | |
} | |
var name=friend.querySelector('[tabindex] > div >div:nth-child(2) >div:nth-child(2) >div:nth-child(2)').textContent | |
ar.push({image,name,phone}) | |
} | |
console.log(ar.length); | |
copy(JSON.stringify(ar)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment