Skip to content

nakigoe/linkedin-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 

Repository files navigation

Connect with People on LinkedIn, Send a Custom Message with Person's Name Automatically!

A Python Selenium bot to automate connection with people on LinkedIn

Send 200 connection requests in 15 minutes with one click, automatically add custom connect message with person's name included!

LinkedIn constantly updates its pages elements' selectors. If You would like to see more scripts and more frequent updates, please consider a donation to the student (me) for a new laptop and an education abroad 💲💲: https://nakigoe.org/en/donate

The project needs funding, planned features:

• separating basic documentation and setup instructions;

• separating code into 3 parts:

 1) script logic, 

 2) moving assistant functions into PyPI package, 

 3) adding a separate file with settings;

inquiries: https://t.me/nakigoe

⭐ Add stars to all my repositories on GitHub: https://github.com/nakigoe

3 February 2024 update:

eternal_wait() function introduced to wait for login and other critical pages to load. That is the star of this script!!!

• LinkedIn has limited the number of personalized invitations that could be sent per month, so the script sends 200 invitations per week as previousely, but the function that sent a custom message with a person's name is turned on by setting the CONNECT_WITH_NAME = True. Currently is set to CONNECT_WITH_NAME = False to keep the number of available personalized messages per month to the moments when you actually need them.

24 January 2024 major upgrade:

• Added search by multiple locations and multiple occupations, see the arrays us_locations, uk_locations, and linkedin_occupations. You still might need to copy‑n‑paste the exact search URL from the actual search page to add other parameters than location and occupation. Currently only one optional parameter is added: new connection is your 2-nd connection.

• Element selectors update

19 January 2024 update:

Multi-search feature added:

• You can now add multiple people from your contacts, whom contacts you want to connect to, defined in search_links_array;

20 October 2023 upgrade:

• outdated cookie files with entire auth folder are deleted automatically, and a standard login procedure with a username and password starts;

24 September 2023 upgrade:

• if a message recepeient's name is too long, shortens it to fit the LinkedIn limit of 200 characters per message.

13 September 2023 major upgrade:

• correct successful login indicator

02 September 2023 major upgrade: improved algorithm and functions, added custom_search query support.

27 August 2023 major upgrade: added user agent, cookies and local storage support to keep the login information from the last session and to reduce LinkedIn automation detection.

How To Use

You must use English LInkedIn for the script to work.

The script has been written and tested many times for use with the Microsoft Edge browser. Sometimes installing the LATEST VERSION of Microsoft Edge on your device is required for the correct operation of this automation software.

Sometimes you need to manually download msedgedriver.exe from the Microsoft website: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/

Enter the path to the downloaded msedgedriver.exe into system variables.

Screen resolution and width is rather important when it comes to LinkedIn.
The script is tested on 1280px and 1366px screen width resolutions. It is working!

Change Weekly:

There is a weekly limit of invitations that could be sent on LinkedIn, so, to reduce automation detection, Your current weekly limit is set to 200 in weekly_limit and Your current weekly_counter is stored in a separate file linkedin-weekly-counter.txt.

Be sure to reset manually the value inside the file linkedin-weekly-counter.txt back to 0 every Monday! Just utilize any text editor and replace any value inside the file with 0

Change:

• Your browser information You usually use to browse LinkedIn (to reduce automation detection) user_agent

You can find your current browser's user-agent by searching "What's my user-agent?" in any search engine, it is just a string.

• The email to login on LinkedIn username

• Your password password

• People on LinkedIn in whose connections You are interested, see search_query_array, in that case change custom_query_array to [] right after the appropriate for cycle

Make sure that the target people allowed to browse their contacts. One can disable that in the profile settings. You have to find people who allowed his / her contacts to be browsed. The link to the list of the person's connections must be clickable on their profile.

• Search by multiple locations and multiple occupations, see the arrays us_locations, uk_locations, and linkedin_occupations and the appropriate for cycle just below them. You still might need to copy‑n‑paste the exact search URL from the actual search page to add other parameters than location and occupation. Currently only one optional parameter is added: new connection is your 2-nd connection.

• Your custom messages set (without greating, the greating is included in the code!). Include as many different messages as reasonably possible to minimize LinkedIn automation detection:

linkedin-invitation-0.txt

linkedin-invitation-1.txt

linkedin-invitation-2.txt

linkedin-invitation-3.txt

• Your number of custom messages:

number_of_messages

Install Python:

https://www.python.org/downloads/

Install PIP If it Has Not been Installed With Python Automatically:

https://pip.pypa.io/en/stable/installation/

Install Libraries (please open the command line interface):

• Selenium pip install selenium

Start Connecting with People on LinkedIn!

• double-click on start.bat

The fresh version is always here: https://github.com/nakigoe/linkedin-bot
Please write if You would like programming lessons: nakigoetenshi@gmail.com
$60 per hour

Put stars on GitHub and share!!!


Please cast an eye on my website:

© NAKIGOE.ORG

All rights reserved and no permissions are granted.

Please add stars to the repositories!

About

Automatically Connect with People on LinkedIn and Send a Custom Message (Python Selenium)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published