linkedin-api icon indicating copy to clipboard operation
linkedin-api copied to clipboard

View profile does not work when user is out of network

Open DanielCambray opened this issue 2 years ago • 1 comments

When I try to view the profile the method view_profile of a user that is out of my network. I have the following error :

 line 1205, in view_profile
    network_distance = int(
ValueError: invalid literal for int() with base 10: 'OF'

The problem is this section :

            network_distance = int(
                profile_network_info["distance"]
                .get("value", "DISTANCE_2")
                .split("_")[1]
            )

Because profile_network_info["distance"] is equal to "OUT_OF_NETWORK". So the result of the function is "OF" that cannot be cast to an int. What should be the right value in this case ?

DanielCambray avatar Mar 12 '23 03:03 DanielCambray

@DanielCambray Any solution you found out ? Also i am getting error clientApplicationInstance. How to deal with this.

MadhabaPatra avatar Jan 16 '24 06:01 MadhabaPatra