Skip to main content

LinkedIn scraper to parse user profiles

Project description

linkedin-user-scrape

linkedin-user-scrape is a Python package for scraping user profile data from LinkedIn.

Installation

You can install linkedin-user-scrape via pip:

pip install linkedin-user-scrape

Example Usage

from linkedin_user_scrape import *
import json

email = "<your_email>"
password = "<your_password>"
cookie = "<your_cookie>"

userId = "<linkedin_user_id>"

user_details = get_user_profile_data(userId, cookie, email, password)

print(json.dumps(user_details, indent=4))

How to Obtain the LinkedIn Cookie (li_at)

To use the get_user_profile_data function, you need to provide a LinkedIn cookie (li_at). You can obtain this cookie by following these steps:

  1. Open LinkedIn in your web browser and log in.
  2. Right-click on the page and select "Inspect" (or press Ctrl + Shift + I).
  3. Go to the "Application" tab (in Chrome) or "Storage" tab (in Firefox).
  4. Expand the "Cookies" dropdown and select the LinkedIn URL.
  5. Locate the li_at cookie and copy its value.

Response Format

The get_user_profile_data function returns a dictionary with the following structure:

{
    "Basic Details": basic_details,
    "Work Experience Details": work_experience_details,
    "Education Details": education_details,
    "Project Details": projects_details,
    "Recommendations": recommendations
}
  • basic_details: Contains basic information about the LinkedIn user. (Name, Title, Summary)
  • work_experience_details: Contains details of the user's work experience (Title, Company, Duration).
  • education_details: Contains details of the user's education (Institure, Course, Duration, Summary).
  • projects_details: Contains details of the user's projects.
  • recommendations: Contains recommendations received by the user.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linkedin_user_scrape-1.0.6.tar.gz (5.4 kB view details)

Uploaded Source

File details

Details for the file linkedin_user_scrape-1.0.6.tar.gz.

File metadata

  • Download URL: linkedin_user_scrape-1.0.6.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.10

File hashes

Hashes for linkedin_user_scrape-1.0.6.tar.gz
Algorithm Hash digest
SHA256 c453ec52ad070d7c8f834d7c17da74d8c8c2393e191e40d8bb494f4395113bab
MD5 230cb59d06df66dd88845b37f3f01ad3
BLAKE2b-256 961dd03d17f8b83ef3f033515a009db292ebe4d9a198997244c7376e3158d348

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page