Browse Source

More robust login procedure

pull/67/head
Wesley Kerfoot 5 years ago
parent
commit
41ab642f32
  1. 8
      deletefb/tools/login.py

8
deletefb/tools/login.py

@ -45,7 +45,7 @@ def login(user_email_address,
driver.implicitly_wait(10)
driver.get("https://facebook.com")
driver.get("https://www.facebook.com/login/device-based/regular/login/?login_attempt=1&lwv=110")
email = "email"
password = "pass"
@ -97,4 +97,10 @@ def login(user_email_address,
else:
pass
# block until we have reached the main page
# print a message warning the user
while driver.current_url != "https://www.facebook.com/":
print("Execution blocked: Please navigate to https://www.facebook.com to continue")
time.sleep(5)
return driver

Loading…
Cancel
Save