From 8cc9074934daa67792f3109f25019ee7dc56d55d Mon Sep 17 00:00:00 2001 From: wes Date: Wed, 22 May 2019 19:11:21 -0400 Subject: [PATCH] Refactoring --- deletefb/deletefb.py | 11 +---------- deletefb/tools/wall.py | 7 +++++++ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/deletefb/deletefb.py b/deletefb/deletefb.py index 4247b9f..a2a1aa0 100755 --- a/deletefb/deletefb.py +++ b/deletefb/deletefb.py @@ -3,16 +3,7 @@ import argparse import time import getpass - -import tools.wall as wall - -from seleniumrequests import Chrome -from selenium.webdriver.common.action_chains import ActionChains -from selenium.webdriver.chrome.options import Options -from selenium.common.exceptions import NoSuchElementException, StaleElementReferenceException - -MAX_POSTS = 5000 -SELENIUM_EXCEPTIONS = (NoSuchElementException, StaleElementReferenceException) +import deletefb.tools.wall as wall def run_delete(): parser = argparse.ArgumentParser() diff --git a/deletefb/tools/wall.py b/deletefb/tools/wall.py index 50b5222..bb23e16 100644 --- a/deletefb/tools/wall.py +++ b/deletefb/tools/wall.py @@ -1,3 +1,10 @@ +from selenium.webdriver.chrome.options import Options +from seleniumrequests import Chrome +from selenium.webdriver.common.action_chains import ActionChains +from selenium.common.exceptions import NoSuchElementException, StaleElementReferenceException + +MAX_POSTS = 5000 +SELENIUM_EXCEPTIONS = (NoSuchElementException, StaleElementReferenceException) def delete_posts(user_email_address, user_password,