Skip to content

This package is used to get a profile picture of the LinkedIn user using Google Custom Search API

License

Notifications You must be signed in to change notification settings

shashankdeshpande/linkedin-profile-picture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinkedIn Profile Picture Search

  • I wanted to get profile picture of a LinkedIn user by using his/her linkedin id. I have earlier created this github repository which extract publically available profile data including profile picture and other details such as experience, education etc.
  • But due to restrictions by LinkedIn, it was not able to login on remote server in order to extract profile data. So, I decided to fetch profile pictures that are available through google image search. This method is not able to extract profile picture for all the users due to user's privacy settings and google's algorithm behind image search but, we can get some profile pictures without logging in linkedin.

To be able to use this library, you need to enable Google Custom Search API, generate API key credentials and set a project:

After setting up your Google developers account and project, you should have been provided with developers API key and project CX.

Install directly from the GitHub repository

pip install git+https://github.com/shashankdeshpande/linkedin-profile-picture.git
> from linkedin_profile_picture import ProfilePicture
> profile = ProfilePicture("your_dev_key","your_project_cx")
> res = profile.search("linkedin_id")
> res.link
"https://media-exp1.licdn.com/dms/image/C5103AQFg0lOJGLL5nQ/profile-displayphoto-shrink_200_200/0?e=1605139200&v=beta&t=ezcdygbf8i6Hz7DLdZ2xbKkzpbpPlFHryQ_uUJ2XW-8"