Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions Auto-Linkedin/Auto-LinkedIn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from selenium import webdriver #connect python with webbrowser-chrome
from selenium.webdriver.common.keys import Keys
import pyautogui as pag

def main():
url = "http://linkedin.com/" #url of LinkedIn
network_url = "http://linkedin.com/mynetwork/" # url of LinkedIn network page
driver = webdriver.Chrome('F:\Argha\WebDriver\chromedriver.exe') # path to browser web driver
driver.get(url)

def login():
username = driver.find_element_by_id("login-email") # Getting the login element
username.send_keys("username") # Sending the keys for username
password = driver.find_element_by_id("login-password") # Getting the password element
password.send_keys("password") # Sending the keys for password
driver.find_element_by_id("login-submit").click() # Getting the tag for submit button

def goto_network():
driver.find_element_by_id("mynetwork-tab-icon").click()

def send_requests():
n= input("Number of requsts: ") # Number of requests you want to send
for i in range(0,n):
pag.click(880,770) # position(in px) of connection button
print("Done!")

26 changes: 26 additions & 0 deletions Auto-Linkedin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Auto Linkedin

- It imports the necessary modules:
- webdriver from Selenium to control the web browser,
- Keys from Selenium to handle keyboard keys, and pyautogui as pag to simulate mouse clicks.

- The main() function sets up the Selenium WebDriver with the Chrome browser and opens the LinkedIn website.

- The login() function finds the login elements on the LinkedIn page and enters the provided username and password.

- It also clicks the submit button to log in.

- The goto_network() function clicks on the "My Network" tab on the LinkedIn page.

- The send_requests() function prompts the user to enter the number of connection requests they want to send.

- It then uses the PyAutoGUI library to simulate mouse clicks on the connection button (at the specified position) the specified number of times.

- Install this before running :
1. pip install selenium
2. pip install pyautogui

Once you have installed the necessary libraries and downloaded the Chrome WebDriver, you should be able to run the code successfully.

**Thanks for using this program**