A python library to scrape user's messages data from linkedin automatically.
Project description
Linkedin-Message-Scraper-Bot is a python library to scrape messages of a user on linkedin using browser automation. It currently runs only on windows.
Example
In this example we first import library, then we login with cookies and then scrape data.
from linkedin_message_scraper_bot import *
true=True;false=False
list_of_cookies=[
{
"domain": ".linkedin.com",
"expirationDate": 1676463230,
"hostOnly": false,
"httpOnly": false,
"name": "_ga",
"path": "/",
"sameSite": "unspecified",
"secure": false,
"session": false,
"storeId": "0",
"value": "GA1.2.1029585723.1610264105",
"id": 1
}]
#please replace the above sample cookies with your cookies, can see below link of how to fetch cookies
linkedin.login_cookie(cookies=list_of_cookies)
response=linkedin.get_messages(profile_link='https://www.linkedin.com/in/abhishek-chaudhary-/')
data=response['body']
This module depends on the following python modules
BotStudio
bot_studio is needed for browser automation. As soon as this library is imported in code, automated browser will open up. Complete documentation for Linkedin Automation available here. Please check this link how to get cookies to login to your linkedin.
Installation
pip install linkedin-message-scraper-bot
Import
from linkedin_message_scraper_bot import *
Login with credentials
linkedin.login(username="linkedin username",password="linkedin password")
Login with cookies
linkedin.login_cookie(cookies=list_of_cookies)
Get Messages of a user
response=linkedin.get_messages(profile_link='profile_link')
data=response['body']
Send Feedback to Developers
bot_studio.send_feedback(feedback="Need help with this ......")
Cookies
To login with cookies Edit this Cookie Extension can be added to browser. Please check this link how to get cookies to login to your linkedin.
Contact Us
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for linkedin-message-scraper-bot-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b4db59144e59ad30d005cbdf600993f7796e5f1b78625b8dc7ec292520b96a9 |
|
MD5 | b057747afb15d3fcdb0283c9d6962cd7 |
|
BLAKE2b-256 | b5d0eb7cea78a66fc6131e50d1de643ea109c8dc04a085926200ce4eac363c33 |