|
@ -1,6 +1,7 @@ |
|
|
from .chrome_driver import get_webdriver, setup_selenium |
|
|
from .chrome_driver import get_webdriver, setup_selenium |
|
|
from selenium.common.exceptions import NoSuchElementException |
|
|
from selenium.common.exceptions import NoSuchElementException |
|
|
from selenium.webdriver.chrome.options import Options |
|
|
from selenium.webdriver.chrome.options import Options |
|
|
|
|
|
from ..quit_driver import quit_driver_and_reap_children |
|
|
|
|
|
|
|
|
import time |
|
|
import time |
|
|
|
|
|
|
|
@ -42,6 +43,7 @@ def login(user_email_address, |
|
|
|
|
|
|
|
|
driver_path = get_webdriver(chrome_binary_path) |
|
|
driver_path = get_webdriver(chrome_binary_path) |
|
|
driver = setup_selenium(driver_path, chrome_options) |
|
|
driver = setup_selenium(driver_path, chrome_options) |
|
|
|
|
|
try: |
|
|
driver.implicitly_wait(10) |
|
|
driver.implicitly_wait(10) |
|
|
|
|
|
|
|
|
driver.get("https://www.facebook.com/login/device-based/regular/login/?login_attempt=1&lwv=110") |
|
|
driver.get("https://www.facebook.com/login/device-based/regular/login/?login_attempt=1&lwv=110") |
|
@ -98,3 +100,5 @@ def login(user_email_address, |
|
|
time.sleep(5) |
|
|
time.sleep(5) |
|
|
|
|
|
|
|
|
return driver |
|
|
return driver |
|
|
|
|
|
except: |
|
|
|
|
|
quit_driver_and_reap_children(driver) |
|
|