Login to LinkedIn Automatically with this python library
--
In this article, we will see how to login to linkedin without writing selenium code and using credentials as well as cookies. We will use bot-studio library
Below are the detailed steps with code:-
- Install bot-studio
pip install bot-studio
2. Import bot-studio
from bot_studio import *
3. Create linkedin object, which will open automated chrome browser for linkedin.
linkedin=bot_studio.linkedin()
4. Login using credentials
linkedin.login(username='username', password='password')
5. Login to linkedin through cookies. You can get cookies from Edit this Cookie Chrome Extension in simple steps:-
>Add this extension to chrome.
>Open linkedin and log in.
>Click on extension icon, then click on export cookies.
>Now cookies will be copied to clipboard , replace list of cookies with these copied cookies.
false=False;true=True
cookie_list='list of cookies'
linkedin.login_cookie(cookies=cookie_list)
You will be successfully signed in at this point