A python library that uses browser automation to login & scrape details from company profile page on linkedin It uses datakund internally
Complete Documentation available here
For any help / feedback you can message us here
pip install linkedin-company-profile-scraper
from linkedin-company-profile-scraper import *
To scrape details of company profile page on linkedin first we will login to linkedin. There are two ways of login:-
- Credentials
- Cookies
linkedin.login(email="",password="")
linkedin.login_cookie(cookies="list_of_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
},
...
...
]
To fetch profile details from company page on linkedin we use get_company_profile
function.
It requires company_link as input parameter
linkedin.get_company_profile(company_link="company_profile_page_link_here")
{
}
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.