Everytime i try to use it it gives me this lines ..
Cookie file not found, creating cookie...
Traceback (most recent call last):
File "quickstart.py", line 5, in
session.login()
File "/Users/hameidalmzrouie/Desktop/InstaPy/instapy/instapy.py", line 322, in login
self.bypass_suspicious_attempt):
File "/Users/hameidalmzrouie/Desktop/InstaPy/instapy/login_util.py", line 136, in login_user
"//select[@class='_fsoey']/option[text()='English']").click()
File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 385, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 955, in find_element
'value': value})['value']
File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//select[@class='_fsoey']/option[text()='English']"}
(Session info: chrome=66.0.3359.181)
(Driver info: chromedriver=2.38.551581 (2c9c29527ada10af4745ab26dd000ebb6d5e055e),platform=Mac OS X 10.13.4 x86_64)
Go to your instapy folder
then open the instapy.py file in a python editor
then find "self.switch_language=True"
change =True to =False
then save file and refresh
then run quickstart.py again
Incase you get an Error stating wrong login details
Go to your instapy folder
then open the login_util.py file then
Find this part of the script then
Update Yours
if switch_language:
browser.find_element_by_xpath(
"//select[@class='hztqj']/option[text()='English']").click()
# Check if the first div is 'Create an Account' or 'Log In'
login_elem = browser.find_element_by_xpath(
"//article/div/div/p/a[text()='Log in']")
if login_elem is not None:
ActionChains(browser).move_to_element(login_elem).click().perform()
# Enter username and password and logs the user in
# Sometimes the element name isn't 'Username' and 'Password'
# (valid for placeholder too)
sleep(5)
input_username = browser.find_elements_by_xpath(
"//input[@name='username']")
ActionChains(browser).move_to_element(input_username[0]). \
click().send_keys(username).perform()
sleep(1)
input_password = browser.find_elements_by_xpath(
"//input[@name='password']")
if not isinstance(password, str):
password = str(password)
ActionChains(browser).move_to_element(input_password[0]). \
click().send_keys(password).perform()
UPDATE mainly this two lines
if switch_language:
browser.find_element_by_xpath
"//select[@class='hztqj']/option[text()='English']").click()
And
sleep(5)
input_username = browser.find_elements_by_xpath(
"//input[@name='username']")
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this problem still occurs, please open a new issue
Most helpful comment
UPDATE mainly this two lines
if switch_language:
browser.find_element_by_xpath
"//select[@class='hztqj']/option[text()='English']").click()
And
sleep(5)
input_username = browser.find_elements_by_xpath(
"//input[@name='username']")