Closed yaruqian closed 3 weeks ago
@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!
@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.
@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
`
@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)
This is included in the v2.3.0 release. https://github.com/tomquirk/linkedin-api/releases/tag/v2.3.0
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