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 :: How to install XGBoost package in python 
Python :: python program to print prime numbers in an interval 
Python :: pandas map multiple columns 
Python :: how to remove arrays in python from a specific place 
Python :: pygame how to get surface lenght 
Python :: how to do http requetss python 
Python :: list adding to the begining python 
Python :: memory used by python program 
Python :: connect with pyodbc with statement 
Python :: how to give column names in pandas when creating dataframe 
Python :: how to create a label in tkinter 
Python :: copy a list python 
Python :: how to get something from a certian possition in a list python 
Python :: python folder exists 
Python :: with urllib.request.urlopen("https:// 
Python :: discord bot python add bio 
Python :: uniform distribution python example 
Python :: how to create table in a database in python 
Python :: reset django database 
Python :: print ocaml 
Python :: 2 for loops at the same time in Python 
Python :: python ddos 
Python :: find average of list python 
Python :: print str and float python 
Python :: save and load a machine learning model using Pickle 
Python :: is flask open source 
Python :: how to change background of tkinter window 
Python :: make binary tree in python 
Python :: pandas shift column down 
Python :: python try then change something and try again if fails 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =