diff --git a/README.md b/README.md index 776cde6..86ab71b 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,10 @@ Personally, I did this so I would feel less attached to my Facebook profile * 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. +## 2FA +* If you have 2-Factor Auth configured then the script will pause for 20 + seconds to allow you to enter your code and log in. + ## How To Install Python ### MacOS diff --git a/deletefb/deletefb.py b/deletefb/deletefb.py index edc593d..b4d92d2 100755 --- a/deletefb/deletefb.py +++ b/deletefb/deletefb.py @@ -73,6 +73,11 @@ def delete_posts(user_email_address=None, loginelement = driver.find_element_by_id(login) loginelement.click() + if "Two-factor authentication" in driver.page_source: + # Allow time to enter 2FA code + print("Pausing to enter 2FA code") + time.sleep(20) + print("Continuin execution") driver.get(user_profile_url) for _ in range(MAX_POSTS): diff --git a/setup.py b/setup.py index 886499c..0193783 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open("README.md", "r") as fh: setuptools.setup( name="delete-facebook-posts", - version="1.0.2", + version="1.0.3", author="Wesley Kerfoot", author_email="wes@wesk.tech", description="A Selenium Script to Delete Facebook Posts",