Run this command inside the project directory to install dependencies: pip install -r requirements.txt
For chrome driver see section : Setting up the Selenium Driver
Inside main.py enter your chromium driver path in this variable driver_path
Make sure that your computer's doesn't sleep while you are running this script.
Setting up the Selenium Driver
The application uses Chrome as the web driver. If you want to use any other browser, make sure you modify the scrip and download appropriate drivers. Below instructions are for chrome although a lot of them would be transferable:
Download the chrome driver for your Google Chrome Version from chromium drivers: link
Store it in a location and copy the path.
On a Mac, for your chrome driver to be allow-listed, fire up the below command on your terminal along with the path to your chrome driver. This is needed to allow the macOS to allow-list the driver and not check for a verified publisher. (source):
xattr -d com.apple.quarantine <PATH_OF_DRIVER>
Run
Go inside the project directory and run: python main.py
It would open up LinkedIn page, perform the signIn manually and then leave the script, it would start accepting your requests.
Troubleshooting
As this script targets the accept button by its class, there might be cases in which class of the linkedin accept button is changed, in that case go to contants.py file and change the second parameter (after @class) of XPATH_PATTERN_OF_LINKEDIN_CONNECTION_ACCEPT_BUTTON with correct class pattern