Browse Source

Merge pull request #67 from weskerfoot/fix-login

Fix login
pull/76/head
Wesley Kerfoot 5 years ago
committed by GitHub
parent
commit
0649310fc5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      README.md
  2. 8
      deletefb/tools/login.py

8
README.md

@ -46,6 +46,14 @@ git+https://github.com/weskerfoot/DeleteFB.git`
* Be patient as it will take a very long time, but it will eventually clear
everything. You may safely minimize the chrome window without breaking it.
## Login
* The tool will log in using the credentials passed to it. It will wait until
the page "https://www.facebook.com/" is loaded in order to avoid any issues
with logging in. If you pass a 2FA token explicitly with the `-F` option,
then it will try to enter that for you. If there are any issues, it simply
pauses indefinitely to allow the user to resolve the problems, and then
continues execution.
## 2FA
* It is recommended that you disable Two-Factor Authentication temporarily
while you are running the script, in order to get the best experience.

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