Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

instagram login with selenium py

driver.find_element_by_xpath("//input[@name='username']").send_keys(username)
driver.find_element_by_xpath("//input[@name='password']").send_keys(password)
driver.find_element_by_xpath("//button[contains(.,'Log in')]").click()
Comment

selenium python login instagram

from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait

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

wait = WebDriverWait(browser, 10)

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

second_page_flag = wait.until(EC.presence_of_element_located(
    (By.CLASS_NAME, "KPnG0")))  # util login page appear


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_xpath(
    "//form[@class='HmktE']/div[3]/button")

login_button_.click()
Comment

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()
Comment

PREVIOUS NEXT
Code Example
Python :: japanese translator google 
Python :: List Method: list append vs extend 
Python :: python non public method 
Python :: Use Python to calculate (((1+2)*3)/4)^5 
Python :: duplicate a list with lowercase in python 
Python :: pe039 
Python :: if the value is not in dict return default 
Python :: floor without import 
Python :: get method to create a set of counters in python 
Python :: php echo shorthand example 
Python :: programme phyton pour realiser un programme qui transforme une image en niveau de gris 
Python :: how to make a relationship in python 
Python :: Python - Comment préparer la capitalisation 
Python :: argmin returns one value for 2d array 
Python :: gwt height with tkinker 
Python :: non preemptive priority scheduling in c# 
Python :: is complex datatype immutable in python 
Python :: rectangle function numpy 
Python :: locate certs path for python 
Python :: how to see if something is in a class in python 
Python :: Python Print Variable Using the + operator to join variables 
Python :: get multiples of a number between two numbers python 
Python :: write in file python 
Python :: pytorch starting 
Python :: copy a 2d list python 
Python :: uneven chunks of array slices 
Python :: django graphene without model 
Python :: stellargraph python 
Python :: how to save date in cookie Python 
Python :: pprint dic without sorting 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =