😎
Templates
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

1
from naas_drivers import linkedin
2
import naas
Copied!

Get your cookies

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

Variables

1
# Outputs
2
csv_output = "LinkedIn_connections.csv"
Copied!

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
1
df = linkedin.connect(LI_AT, JSESSIONID).network.get_connections(limit=-1)
2
df
Copied!

Output

Save dataframe in CSV

1
df.to_csv(csv_output, index=False)
Copied!

Share output with naas

1
naas.asset.add(csv_output)
2
3
#-> to remove your output, uncomment this line and execute the cell
4
# naas.asset.delete(csv_output)
Copied!
Copy link
Edit on GitHub