Answer the question
In order to leave comments, you need to log in
How to pass value to Instagram search string using Selenium (Python)?
Good day everyone!
I'm new to Selenium and I'm trying to pass a specific nickname to the Instagram search field.
There is a code:
username="USERNAME"
password="PASSWORD"
driver=webdriver.Chrome("C:\\Users\\ME\\Downloads\\chromedriver_win32\\chromedriver.exe")
driver.get("https://www.instagram.com/accounts/login/")
driver.find_element_by_xpath("//div/input[@name='username']").send_keys(username)
driver.find_element_by_xpath("//div/input[@name='password']").send_keys(password)
driver.find_element_by_xpath("//span/button").click()
driver.find_element_by_xpath("//input[@placeholder='Поиск']").send_keys('NICKNAME')
https://www.instagram.com/NICKNAME/
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question