Skip to content

Commit 1ea1dc9

Browse files
authored
Merge pull request #124 from RishabhGupta34/master
Added Linkedin automation script
2 parents 806936a + c3b95f2 commit 1ea1dc9

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
### Linkedin_Automation
2+
This is Linkedin's automation script.This automation script helps in making more connections on linkedin.
3+
4+
Just run the script using the command
5+
6+
python linkedin_automation.py
7+
8+
enter the email address and the password when asked and then it will automatically go to the connections page to invite more connections.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
url="https://www.linkedin.com"
2+
3+
from selenium import webdriver
4+
browser=webdriver.Chrome()
5+
6+
browser.get(url)
7+
8+
browser.maximize_window()#Maximizing the window
9+
10+
username=browser.find_element_by_id("login-email")
11+
username.send_keys(input("Enter The Email of your LinkedIn Account"))#Enter the email of your linkedin account in the prompt
12+
13+
14+
input_pass=browser.find_element_by_id("login-password")
15+
from getpass import getpass
16+
password=getpass("Enter the password")
17+
input_pass.send_keys(password)#enter the password in the prompt
18+
19+
20+
from selenium.webdriver.common.keys import Keys
21+
input_pass.send_keys(Keys.ENTER)
22+
23+
browser.find_element_by_id('mynetwork-tab-icon').click()
24+
cnt=0
25+
import time
26+
import random
27+
for i in range(100): #Enter the number of times to reload the network-page
28+
if i!=0:
29+
browser.refresh()
30+
time.sleep(3)
31+
connections=browser.find_elements_by_class_name('artdeco-button__text')
32+
for i in connections:
33+
if i.is_displayed():
34+
time.sleep(random.randint(2,3))
35+
i.click()
36+
cnt+=1
37+
print(cnt) #Prints done for each connection made
38+
39+
40+
browser.close()

0 commit comments

Comments
 (0)