Cypress automation for getting mutual connections with companies to leadgen them.
Warning: LinkedIn has strong anti-scraping policies, they may blacklist ips making unauthenticated or unusual requests
- First You have to check that Node.js is installed
- Run the terminal console and checkout the project by
git clone https://github.com/procoders/salesnav-collect-1.git
- Go to project folder by
cd ~/salesnav-collect-1
- Install all the packages by running
npm i
Use Chrome browser for the following steps:
- Navigate to Linkedin.com and log in
- Open up the browser developer tools (Ctrl-Shift-I or right click -> inspect element)
- Select the Application tab
- Under the Storage header on the left-hand menu, click the Cookies dropdown and select www.linkedin.com
- Find the
li_at
cookie, and double click the value to select it before copying
Your token will look like AQEDAQe65gUEbNDLAAABcN6bpJMAAAFxAmcok00AAsz3E4cwkpIwJcrtHt8HloLcGOdyhIcwPIvuoYDUQqSu3RhUrauqaT7GRfzn. Keep somewhere for futher use
- Put csv with companies list from Crunchbase with LinkedIn column to
fixtures/crunchbase-lists
folder - Run
npm run build-list -- --env it_at=<your_linked_in_token>,listname=<your_file_name_without_csv_extension>
For example
npm run build-list -- --env it_at=AQEDAQe65gUEbNDLAAABcN6bpJMAAAFxAmcok00AAsz3E4cwkpIwJcrtHt8HloLcGOdyhIcwPIvuoYDUQqSu3RhUrauqaT7GRfzn,listname=demo-crunch
You will find you updated account list with companies at your SalesNav account
Run
npm run mutuals -- --env it_at=<your_linked_in_token>,listname=<your_file_name_without_csv_extension>,searchurl="<your_search_url_from_linkedin>"
You will be able to get your result csv as fixtures/contacts/mutuals-<your_listname>.csv
file
For example
npm run mutuals-list -- --env it_at="AQEDAQe65gUEbNDLAAABcN6bpJMAAAFxAmcok00AAsz3E4cwkpIwJcrtHt8HloLcGOdyhIcwPIvuoYDUQqSu3RhUrauqaT7GRfzn",listname="demo-crunch",searchurl=https://www.linkedin.com/sales/search/people?doFetchHeroCard=false&excludeContactedLeads=true&excludeSavedLeads=true
Since you wnat to see how script works in a realtime browser than use
npm run cypress:open -- --env .....
In cypress/state
subfolder you will see files according to your LinkedIn lists names. Since deliting it you purge the state and list collecting will be started from scratch
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
We gear IT up!
Procoders mission is to ship meaningful code, all our partners come from referrals, and our pricing model is transparent and fair. Drop us a line and let’s start a conversation right now.