diff --git a/Linkedin_Automation/README.md b/Linkedin_Automation/README.md new file mode 100644 index 0000000..1ad5265 --- /dev/null +++ b/Linkedin_Automation/README.md @@ -0,0 +1,8 @@ +### Linkedin_Automation +This is Linkedin's automation script.This automation script helps in making more connections on linkedin. + +Just run the script using the command + +python linkedin_automation.py + +enter the email address and the password when asked and then it will automatically go to the connections page to invite more connections. diff --git a/Linkedin_Automation/linkedin_automation.py b/Linkedin_Automation/linkedin_automation.py new file mode 100644 index 0000000..a4e407e --- /dev/null +++ b/Linkedin_Automation/linkedin_automation.py @@ -0,0 +1,40 @@ +url="https://www.linkedin.com" + +from selenium import webdriver +browser=webdriver.Chrome() + +browser.get(url) + +browser.maximize_window()#Maximizing the window + +username=browser.find_element_by_id("login-email") +username.send_keys(input("Enter The Email of your LinkedIn Account"))#Enter the email of your linkedin account in the prompt + + +input_pass=browser.find_element_by_id("login-password") +from getpass import getpass +password=getpass("Enter the password") +input_pass.send_keys(password)#enter the password in the prompt + + +from selenium.webdriver.common.keys import Keys +input_pass.send_keys(Keys.ENTER) + +browser.find_element_by_id('mynetwork-tab-icon').click() +cnt=0 +import time +import random +for i in range(100): #Enter the number of times to reload the network-page + if i!=0: + browser.refresh() + time.sleep(3) + connections=browser.find_elements_by_class_name('artdeco-button__text') + for i in connections: + if i.is_displayed(): + time.sleep(random.randint(2,3)) + i.click() + cnt+=1 + print(cnt) #Prints done for each connection made + + +browser.close() \ No newline at end of file