LinkedIn

Improve your KYC thanks to Linkedin connection

As of June 2021, we are starting a refactoring of the LinkedIn driver, please refer to the awesome-notebook Github page to get the latest updates.

Get your cookies

To access your LinkedIn data, you need to learn how to get your cookies.

To get your cookies, please follow this tutorial.

Get

Profile

Formula

from naas_drivers import linkedin
# Enter cookies information
LI_AT = 'YOUR_COOKIE_LI_AT' # EXAMPLE : AQFAzQN_PLPR4wAAAXc-FCKmgiMit5FLdY1af3-2
JSESSIONID = 'YOUR_COOKIE_JSESSIONID' # EXAMPLE : ajax:8379907400220387585
# Enter the linkedin id or linkedin url
url = "LINKEDIN_ID" or "LINKEDIN_URL"
# Get dataframe as result
df = linkedin.connect(LI_AT, JSESSIONID).get_profil(url)
df

Result

  • FIRSTNAME : First name

  • LASTNAME : Last name

  • BIRTHDATE_DAY : Day of birth in format DD

  • BIRTHDATE_MONTH : Month of birth in format MM

  • BIRTHDATE_YEAR : Year of birth in format YYYY

  • BIRTHDATE : Birthdate in format DD, MM - YYYY

  • COUNTRY : Country name

  • ADDRESS : Address

  • LK_HEADLINE : Job description (headline)

  • LK_SECTOR : Work industry

  • LK_FOLLOWERS : Number of followers

  • LK_PHONE : Phone number

  • LK_EMAIL : Email

  • LK_TWITER : Twitter account

Messages (last 20)

Formula

from naas_drivers import linkedin
# Enter cookies information
LI_AT = "YOUR_COOKIE_LI_AT" # EXAMPLE AQFAzQN_PLPR4wAAAXc-FCKmgiMit5FLdY1af3-2
JSESSIONID = "YOUR_COOKIE_JSESSIONID" # EXAMPLE ajax:8379907400220387585
# Get dataframe as result
df = linkedin.connect(LI_AT, JSESSIONID).get_messages()
df

Result

  • FIRSTNAME : First name

  • LASTNAME : Last name

  • OCCUPATION : Job description (headline)

  • PROFILE_PUBLIC_ID : LinkedIn ID

  • LAST_ACTIVITY : Last activity in format YYYY-MM-DD HH:MM:SS

  • LAST_READ_AT : Last message read at in format YYYY-MM-DD HH:MM:SS

  • MESSAGE_TEXT : Message content

  • MESSAGE_TYPE : Message type

Post data

Formula

from naas_drivers import linkedin
# Enter cookies information
LI_AT = "YOUR_COOKIE_LI_AT" # EXAMPLE AQFAzQN_PLPR4wAAAXc-FCKmgiMit5FLdY1af3-2
JSESSIONID = "YOUR_COOKIE_JSESSIONID" # EXAMPLE ajax:8379907400220387585
# Enter post url
url = "YOUR_POST_URL"
# Get dataframe as result
df = linkedin.connect(LI_AT, JSESSIONID).get_post_data(url)
df

Result

  • URL : Post url

  • TITLE : Post text before first break

  • DATE : Time since post publication

  • VIEWS : Numbers of views

  • COMMENTS : Numbers of comments

  • LIKES : Numbers of likes

  • LIKES_LIKE : Numbers of likes type "like"

  • LIKES_PRAISE : Numbers of likes type "praise"

  • LIKES_INTEREST : Numbers of likes type "interest"

  • LIKES_APPRECIATION : Numbers of likes type "appreciation"

  • LIKES_EMPATHY : Numbers of likes type "empathy"

Advanced

You can "connect" before any other methods and use your object in your formulas

from naas_drivers import linkedin
# Enter cookies information
LI_AT = "YOUR_COOKIE_LI_AT" # EXAMPLE AQFAzQN_PLPR4wAAAXc-FCKmgiMit5FLdY1af3-2
JSESSIONID = "YOUR_COOKIE_JSESSIONID" # EXAMPLE ajax:8379907400220387585
# Connect to Linkedin
LK = linkedin.connect(LI_AT, JSESSIONID)
# Get last 20 messages
df = LK.get_messages()