-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstanew.py
31 lines (25 loc) · 966 Bytes
/
instanew.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
def instanew(userid,key):
new = webdriver.Firefox()
new.get('https://www.instagram.com/accounts/login/?source=auth_switcher')
time.sleep(3)
username = new.find_element_by_name('username')
password = new.find_element_by_name('password')
username.clear()
password.clear()
username.send_keys(userid)
password.send_keys(key)
password.send_keys(Keys.RETURN)
time.sleep(4)
turn_off = new.find_element_by_css_selector('button.aOOlW:nth-child(2)')
turn_off.click()
time.sleep(3)
# /html/body/span/section/nav/div[2]/div/div/div[3]/div/div[2]/a/span
dil_icon = new.find_element_by_css_selector('._0ZPOP > span:nth-child(1)')
dil_icon.click()
time.sleep(4)
follow_requests = new.find_element_by_class_name('BcJ68')
follow_requests.click()
instanew('YOUR INSTAGRAM ID HERE','YOUR PASSWORD HERE')