Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

selenium python login instagram

from time import sleep
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains

browser = webdriver.Chrome()
browser.get('https://www.instragram.com')

login_elem = browser.find_element_by_xpath('//*[@id="react-root"]/section/main/article/div[2]/div[2]/p/a')
login_elem.click()

user = browser.find_element_by_name("username")

passw = browser.find_element_by_name('password')

ActionChains(browser)
    .move_to_element(user).click()
    .send_keys('test')
    .move_to_element(passw).click()
    .send_keys('test')
    .perform()

login_button = browser.find_element_by_class_name(
'_0mzm- sqdOP  L3NKy       ')


login_button.click()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #selenium #python #login #instagram
ADD COMMENT
Topic
Name
7+3 =