Download user data from LinkedIn
Based on keywords defined by user, perform a LinkedIn query, extract user information from the first results page and store it to a CSV file.
linkedin-scraper [--output FILE] keyword [keyword...]
Search for Java Developers and store the result to java.csv
:
linkedin-scraper --output java.csv java developer
The resulting CSV file can look like this:
First name,Last name,Position,Company,City,Country
Alice,Carter,Python & Java Developer,Google,Mountain View,United States
Robert,Smith,Senior Java Developer,British Airways,London,United Kingdom
...
You can install the package system-wide:
python setup.py install
or for current user only:
python setup.py install --user
Note that to perform LinkedIn queries, the tool needs an access token.
To generate one, log in to LinkedIn in your favourite browser. This will create a cookie named li_at
for site www.linkedin.com
. Save this cookie's value to file .linkedin-access-token
in your home directory.
Some fields in the output CSV file might be empty. This indicates that the scraper failed to extract the relevant piece of information from the results page. One of the common causes is the limited visibility of profiles out of your network, a LinkedIn feature which prevents regular users from accessing certain profile information.