samedi 27 novembre 2021

Error with Selenium module on instagram (scraping)

i have a problem with this bit of code:

from selenium import webdriver
driver = webdriver.Chrome(executable_path="E:\Hack\chromedriver_win32\chromedriver.exe")
driver.get("https://www.instagram.com/")
user_name=driver.find_element_by_xpath('//*[@id="loginForm"]/div/div[1]/div/label/input')
user_name.send_keys('user_name')

Now the problem is that the script cant find the username/pasword input fields on https://www.instagram.com/... I tried through name, class, XPath or whatever it's called but othing! It just doesnt want to work. Can anyone find a solution to this pls ? :(




Aucun commentaire:

Enregistrer un commentaire