Last active
June 3, 2019 15:20
-
-
Save ypcrts/2a1f9043f12f7105e3a0b14a788f1f90 to your computer and use it in GitHub Desktop.
LinkedIn Name Scraping
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
(function () { | |
var s = new Set(); | |
document.querySelectorAll('.actor-name').forEach( e=> { | |
s.add(e.innerText) | |
}); | |
console.log(s) | |
})() |
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
(function () { | |
var q = [ "John Smith, "Wretchéd Hôrse" ] | |
for (let i=0; i < q.length; i++) { | |
const fullname = q[i].split(",")[0].toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, ""); | |
const names = fullname.split(" "); | |
const first = names[0]; | |
const family = names[1]; | |
q[i] = first[0] + family; | |
} | |
console.log(q) | |
return q | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment