-
Notifications
You must be signed in to change notification settings - Fork 27
Bypass new login window #25
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
base: main
Are you sure you want to change the base?
Conversation
I tried it with hungarian login, it worked, but I don't have 2 factor authenticaiton in here, so some aditional change might needed. It uses XPATH instead of ID.
if this is not working change the api.py line 214, the headles to False, like this: and change timeout in 216 to a higher time, like this: this way, you will see the window, and will have time for check, what is the difference ( with F12) |
wait.until(expected_conditions.element_to_be_clickable((By.ID, "field_Password"))).send_keys(password) | ||
self._click(browser, (By.ID, "button_submit")) | ||
wait.until(expected_conditions.visibility_of_element_located((By.XPATH, '//*[@id="duple-button-block"]/button[1]/span'))).click() | ||
#wait.until(expected_conditions.visibility_of_element_located((By.NAME, "EmailOrPhone"))).send_keys(phone) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly is this comment for? Did you forget to remove it? If not, please explain its purpose in the code.
@@ -209,21 +209,16 @@ def _check_2fa_auth(self, browser, wait, verify_mode="phone", verify_token_func= | |||
browser.find_element(By.NAME, "VerificationCode").send_keys(verify_code) | |||
self._click(browser, (By.CLASS_NAME, "role_next")) | |||
|
|||
def login(self, phone, password, **kwargs): | |||
def login(self, email, password, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The login form now seems to require email instead of phone. Could you also replace all other occurences of this (e.g. in the login CLI) where there's "phone" to "email"?
I can see at least one occurence, where the variable should probably be named email
and the (phone number)
part of the string should be changed to (email)
.
lidl-plus/lidlplus/__main__.py
Line 87 in 0f1cd92
username = args.get("user") or input("Enter your lidl plus username (phone number): ") |
The new change can do the login.
Important! For me there was no 2 factor authentication, and worked only with email, so this version works with the email. If your country has 2nd factroy, than maybe some other changes might need.