Browse Source

Update 2FA check to allow for other languages

Check for the specific string indicating 2FA step in several languages.

Added the string for french.
pull/26/head
Jean-Baptiste Mora 6 years ago
committed by GitHub
parent
commit
73c04509f8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      deletefb/deletefb.py

3
deletefb/deletefb.py

@ -99,7 +99,8 @@ def delete_posts(user_email_address,
loginelement = driver.find_element_by_id(login) loginelement = driver.find_element_by_id(login)
loginelement.click() loginelement.click()
if "two-factor authentication" in driver.page_source.lower(): if any(two_auth_str in driver.page_source.lower()
for two_auth_str in ["two-factor authentication", "deux facteurs obligatoire"]:
# Allow time to enter 2FA code # Allow time to enter 2FA code
print("Pausing to enter 2FA code") print("Pausing to enter 2FA code")
time.sleep(20) time.sleep(20)

Loading…
Cancel
Save