😎
Templates
LinkedIn
Google Analytics
Google Drive
Google Search
Google Sheets
Hugging Face
Johns Hopkins
Jupyter Notebooks
Metrics Store
Microsoft Teams
Microsoft Word
Naas Auth
Get connections from network
Tags: #linkedin #network #connections #naas_drivers #csv #analytics
Author: Florent Ravenel

Input

Import library

from naas_drivers import linkedin
import naas

Get your cookies

LI_AT = 'YOUR_COOKIE_LI_AT' # EXAMPLE AQFAzQN_PLPR4wAAAXc-FCKmgiMit5FLdY1af3-2
JSESSIONID = 'YOUR_COOKIE_JSESSIONID' # EXAMPLE ajax:8379907400220387585

Variables

# Outputs
csv_output = "LinkedIn_connections.csv"

Model

Get the information return in a dataframe. Available columns :
  • PROFILE_URN : LinkedIn unique profile id
  • CREATED_AT : Date of connection between and your connection
  • PROFILE_ID : LinkedIn public profile id
  • FIRSTNAME : First name
  • LASTNAME : Last name
  • OCCUPATION : Text below the name in the profile page
df = linkedin.connect(LI_AT, JSESSIONID).network.get_connections(limit=-1)
df

Output

Save dataframe in CSV

df.to_csv(csv_output, index=False)

Share output with naas

naas.asset.add(csv_output)
#-> to remove your output, uncomment this line and execute the cell
# naas.asset.delete(csv_output)
Copy link
Edit on GitHub
On this page
Input
Model
Output