Skip to content

datakund/linkedin-search-people

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Linkedin-Search-People

A python library that uses browser automation to login & search users & scrape user profiles on linkedin It uses datakund internally

Complete Documentation available here

Support

For any help / feedback you can message us here

Installation

pip install linkedin-search-people

Import

from linkedin-search-people import *

Login

To search for users & fetch results on linkedin first we will login to linkedin. There are two ways of login:-

  • Credentials
  • Cookies

Credentials

linkedin.login(email="",password="")

Cookies

linkedin.login_cookie(cookies="list_of_cookies")
Example Cookies

To login with cookies Edit this Cookie Extension can be added to browser and login to linkedin.com , then export cookies and paste in above function of login_cookie. Below is the example of cookies.

{
    "domain": "linkedin.com",
    "expirationDate": 1671116358.392265,
    "hostOnly": false,
    "httpOnly": false,
    "name": "__Secure-3PAPISID",
    "path": "/",
    "sameSite": "no_restriction",
    "secure": true,
    "session": false,
    "storeId": "0",
    "value": "Y1zkx3HJhktM4Y__/A-aOUDHse1TaSaKpQ",
    "id": 1
},
{
    "domain": "linkedin.com",
    "expirationDate": 1672322803.302724,
    "hostOnly": false,
    "httpOnly": true,
    "name": "__Secure-3PSID",
    "path": "/",
    "sameSite": "no_restriction",
    "secure": true,
    "session": false,
    "storeId": "0",
    "value": "5AcqKCt5MuBkjOpLW7PdfNs83knLqt-qVZJzCriY_4_cftxmyExDbYRS65ezLjpKa_Xc7Q.",
    "id": 2
},
...
...

]

Search Users

To search for users on linkedin we use search_people function. It requires keyword as input parameter.

linkedin.search_people(keyword="people_search_keyword_here")

Fetch Profiles

To fetch profile links from search results we use people_results function. It does not require any input parameter.

response=linkedin.people_results()
profile_links=response['body']

Example Response

[
   {
      "Link":"Link 1"
   },
   {
      "Link":"Link 2"
   },
   ...
]

DataKund

It uses datakund internally to do browser automation DataKund is an automation library that uses selenium & supports automation of many sites including Youtube, Amazon, Twitter, LinkedIn , Google etc.

About

A python library to search users on linkedin and scrape search results from linkedin automatically.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published