Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_profile_connections() issue #407

Closed
yaruqian opened this issue Jul 23, 2024 · 5 comments
Closed

get_profile_connections() issue #407

yaruqian opened this issue Jul 23, 2024 · 5 comments
Milestone

Comments

@yaruqian
Copy link

hi,

It seems get_profile_connections() returns all the connections of my own account(the one that I use to login), which is to say that no matter what urn_id I put in, it returns the same results. Does anyone also suffer from the same issue?

Yaru

@EseToni
Copy link

EseToni commented Jul 31, 2024

@yaruqian hi, doing some research, I realized that it returns the common connections between the urn_id and the logged in account, I'm investigating a way to see if the urn_id is already among your connections if you find something communicate!

@yaruqian
Copy link
Author

yaruqian commented Aug 5, 2024

@EseToni Thank you for sharing the information, however, I don't think urn_id is among my connections, since I only have 9 connections in my logged-in account and there are more than 1k urn_id I would like to search, all these 1k urn_id were returning my 9 connections' information.

@EseToni
Copy link

EseToni commented Aug 5, 2024

@yaruqian I recently find a method to know if the profile is in your network
`
try:
profile = api.get_profile_network_info(public_profile_id=data['public_identifier'])
except Exception as e:
return { 'success': False, 'type': 'not_found'}

if profile['distance']['value'] == 'DISTANCE_1':
    return { 'success': True, 'type': 'success'} // the user is on your network
elif profile['distance']['value'] == 'OUT_OF_NETWORK':
    return { 'success': False, 'type': 'rejected'} // out the network
else:
    return { 'success': False, 'type': 'pending', 'next_work': 'check-invitation'} // pending

`

@tomquirk tomquirk added this to the next milestone Sep 1, 2024
@tomquirk
Copy link
Owner

tomquirk commented Sep 1, 2024

@yaruqian @EseToni I've fixed this issue on the main branch (pending PyPI release).

For the meantime, I think if you pass in network_depth=None, it should work as you expect.

profiles = api.get_profile_connections('tom-quirk', network_depth=None)

@tomquirk
Copy link
Owner

tomquirk commented Sep 6, 2024

This is included in the v2.3.0 release.
https:/tomquirk/linkedin-api/releases/tag/v2.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants