-
Install the required gems
$ gem install linkedin $ gem install dotenv
-
Create a dotenv file like so:
$ touch .env
-
In the dotenv file add the following environment variables from your LinkedIn API app
LINKEDIN_CLIENT_ID=your_linkedin_client_id LINKEDIN_CLIENT_SECRET=your_linkedin_client_secret
-
Make sure you have a CSV with the list of companies names in the same directory as the script
-
Now run the script!
$ ruby linkedin_companies_search.rb
-
If you are running this script for the first time follow the instructions to save the access token, if you get an error saying that the token expired, then delete the third line of the .env file if there is one.
-
Following the next instructions from the script (enter the name of the CSV file you want to parse and the column number where the companies' names are listed)
-
There should be a csv file in the same folder called
linkedin_scrape.csv
! -
Enjoy!
josephan / linkedin_company_search Goto Github PK
View Code? Open in Web Editor NEWTakes a list of company names, then grabs their LinkedIn info and outputs to CSV.
License: Other