Browse Source
Merge pull request #67 from weskerfoot/fix-login
Fix login
pull/76/head
Wesley Kerfoot
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
15 additions and
1 deletions
-
README.md
-
deletefb/tools/login.py
|
@ -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 |
|
|
* 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. |
|
|
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 |
|
|
## 2FA |
|
|
* It is recommended that you disable Two-Factor Authentication temporarily |
|
|
* It is recommended that you disable Two-Factor Authentication temporarily |
|
|
while you are running the script, in order to get the best experience. |
|
|
while you are running the script, in order to get the best experience. |
|
|
|
@ -45,7 +45,7 @@ def login(user_email_address, |
|
|
|
|
|
|
|
|
driver.implicitly_wait(10) |
|
|
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" |
|
|
email = "email" |
|
|
password = "pass" |
|
|
password = "pass" |
|
@ -97,4 +97,10 @@ def login(user_email_address, |
|
|
else: |
|
|
else: |
|
|
pass |
|
|
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 |
|
|
return driver |
|
|