-
Notifications
You must be signed in to change notification settings - Fork 792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Login A/B test detected! Trying another string... #274
Comments
Same |
Does this mean this project is dead? Any alternative anyone has come across for instagram? |
inside the instapy source code theres a file which has all the associated xpaths for elements, I have manually inspected the login element Text its now "Log in" instead of "Log In". Fix: Change: to
|
Thank you! That worked for me! |
Thanks a lot. It worked for me too! |
I solved it in a similar way. On the same file, two lines after this there is the line:
make the same change (Log In --> Log in). I am not sure why for me is different but I just solved it by inspecting the button on the instagram page and noticing it was not defined as a button but as a div |
That one did not work for me. I created some new lines of code, which helped me to fix the issue. This is it: ( it has to be copied into login_util.py.
|
I'm new to using InstaPy, but I gathered that this issue comes from login_util.py and it not being able to locate the Log In element. I attached a screenshot of how my login window appears.
Any insight on a way to get around this would be awesome!
starting instapy with quickstart
InstaPy Version: 0.6.16
.. .. .. .. .. .. .. .. ._.
Workspace in use: "C:/Users/vboxuser/InstaPy"
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2022-11-01 20:34:40] [username] Session started!
oooooooooooooooooooooooooooooooooooooooooooooooooooooo
INFO [2022-11-01 20:34:45] [username] - Cookie file not found, creating cookie...
WARNING [2022-11-01 20:34:56] [username] Login A/B test detected! Trying another string...
WARNING [2022-11-01 20:35:01] [username] Could not pass the login A/B test. Trying last string...
ERROR [2022-11-01 20:35:06] [username] Login A/B test failed!
b"Message: Unable to locate element: //div[text()='Log In']\nStacktrace:\nRemoteError@chrome://remote/content/shared/RemoteError.jsm:12:1\nWebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:192:5\nNoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:404:5\nelement.find/</<@chrome://remote/content/marionette/element.js:291:16\n"
Traceback (most recent call last):
File "C:\Users\vboxuser\AppData\Local\Programs\Python\Python311\Lib\site-packages\instapy\login_util.py", line 337, in login_user
login_elem = browser.find_element(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\vboxuser\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 856, in find_element
return self.execute(Command.FIND_ELEMENT, {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\vboxuser\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 429, in execute
self.error_handler.check_response(response)
File "C:\Users\vboxuser\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 243, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: //button[text()='Log In']
Stacktrace:
RemoteError@chrome://remote/content/shared/RemoteError.jsm:12:1
WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:192:5
NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:404:5
element.find/</<@chrome://remote/content/marionette/element.js:291:16
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\vboxuser\AppData\Local\Programs\Python\Python311\Lib\site-packages\instapy\login_util.py", line 343, in login_user
login_elem = browser.find_element(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\vboxuser\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 856, in find_element
return self.execute(Command.FIND_ELEMENT, {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\vboxuser\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 429, in execute
self.error_handler.check_response(response)
File "C:\Users\vboxuser\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 243, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: //a[text()='Log in']
Stacktrace:
RemoteError@chrome://remote/content/shared/RemoteError.jsm:12:1
WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:192:5
NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:404:5
element.find/</<@chrome://remote/content/marionette/element.js:291:16
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\vboxuser\AppData\Local\Programs\Python\Python311\Lib\site-packages\instapy\login_util.py", line 350, in login_user
login_elem = browser.find_element(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\vboxuser\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 856, in find_element
return self.execute(Command.FIND_ELEMENT, {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\vboxuser\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 429, in execute
self.error_handler.check_response(response)
File "C:\Users\vboxuser\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 243, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: //div[text()='Log In']
Stacktrace:
RemoteError@chrome://remote/content/shared/RemoteError.jsm:12:1
WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:192:5
NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:404:5
element.find/</<@chrome://remote/content/marionette/element.js:291:16
The text was updated successfully, but these errors were encountered: