A simple scraper for LinkedIn using Selenium and Chrome.
It captures employee names, descriptions, and profile links from a specified company and saves the data in a CSV file separated by semicolons.
Note
LinkedIn updates its code frequently, so this script might require constant updates.
Git clone this repository:
$ git clone https://github.com/yarxna/inscraper
$ cd inscraper
$ python -m pip install -r requirements.txt
- Close all Chrome browser windows before running the script. If Chrome is open, the script might throw an error.
- Copy the company's "people" page link and paste it as an argument, as shown in the example below:
$ python inscraper.py https://www.linkedin.com/company/<COMPANY-NAME>/people/
- The first time you run the script, a Chrome window will open for you to log in to LinkedIn so the script can access the company’s people page data. Press
ENTERafter completing the login. - From there, the script will harvest people data from the provided company URL.
After the scraping is complete, the employee information will be saved in a file named "linkedin_profiles.csv" in the same folder.
To log out or delete the profile used by the script, delete the inscraperChromeProfile folder.
https://linkedin.com/in/johndoe;John Doe;CEO at Doe Inc
https://linkedin.com/in/mary-2168521512;Mary Lee;Web Developer
- add cross-browser support
- suppress useless warnings/infos messages