This is a quick and dirty script for scraping LinkedIn contacts quickly, for sales lead generation. It also allowed me to learn Puppeteer.
- Dependencies:
convert-csv-to-jsoncsv-parsercsv-writernode-fetchpuppeteer
- You'll need to have a LinkedIn account. Proceed at your own risk (LinkedIn may ban your account).
- You'll also need a Cognism account and API key.
- Download repo and run
node install.
- Make sure
creds.jsis using the right LinkedIn login details. - Amend LinkedIn search params as needed within
index.js(rows 30-31). - In console, run
node index.js. Results will be written to csv/prospects.csv. If there are less than 100 LinkedIn pages of results, there will be an error.
- Use cases where search results come back with less than 100 pages.