LinkedIn data scraping scripts

Here’s a bookmarklet to format the output of the LinkedIn search results into a simple HTML table:

javascript:var w=window.open('about:blank');w.document.writeln('<html><body><table border="1"><tr><td>Name</td><td>Description</td><td>Snippet</td></tr>');a=document.getElementById("results");for (var i=0; i<a.children.length; i++){ r=a.childNodes[i].childNodes[1];n=r.childNodes[0].childNodes[0].innerText; d=r.childNodes[1].innerText;s=r.childNodes[4].childNodes[1].innerText;w.document.writeln('<tr><td>'+n+'</td><td>'+d+'</td><td>'+s+'</td></tr>');};w.document.writeln('</table></body></html>');w.document.close();

And here’s bookmarklet to retrieve the names of the ‘likers’ who have liked posts on a company’s page:

javascript:alert('Ensure that all +x expansions were clicked!! Redo if expansion window contains + sign!');var w=window.open('about:blank');w.document.writeln('<html><body>');a=document.getElementsByClassName("likers uscp-likers");for (var i=0; i<a.length; i++){ w.document.writeln(a[i].innerText);};w.document.writeln('</table></body></html>');w.document.close();

And I’ve also uploaded a script which scraps LinkedIn for person details based on an input Company Name. Provide your own API keys, and you’re good to go.

Leave a comment