Created
June 7, 2021 03:27
-
-
Save shcallaway/f6c6d42794dc8da5823e47673d33a160 to your computer and use it in GitHub Desktop.
Create CSV of LinkedIn people search results
This file contains 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
// Here's a quick script you can copy-paste into your browser console to copy a CSV of people search results from LinkedIn | |
// Example: https://www.linkedin.com/search/results/people/?currentCompany=%5B%223282%22%2C%2236494%22%2C%222142019%22%5D&geoUrn=%5B%22103644278%22%5D&origin=FACETED_SEARCH&profileLanguage=%5B%22en%22%5D&title=sales%20rep | |
var contentStrings = Array.from(document.querySelectorAll('.entity-result__content')).map(node => node.innerText) | |
var tuples = contentStrings.map(function(contentString) { | |
var split = contentString.split("\n") | |
return [split[0], split[split.length-2], split[split.length-1]] | |
}) | |
var joinedTuples = tuples.map(function(tuple) { | |
return tuple.join("|") | |
}) | |
var csv = joinedTuples.join("\n") | |
copy(csv) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment