skip security check selenium linkedin python

Solutions on MaxInterview for skip security check selenium linkedin python by the best coders in the world

showing results for - "skip security check selenium linkedin python"
Francisco
04 Oct 2020
1from selenium import webdriver
2from selenium.webdriver.support.ui import WebDriverWait
3from selenium.webdriver.common.keys import Keys
4from selenium.webdriver.support import expected_conditions as EC
5from selenium.webdriver.common.by import By
6
7email = ""
8password = ""
9chrome_options = webdriver.ChromeOptions()
10chrome_options.add_argument("--start-maximized")
11chrome_options.add_argument("--disable-gpu")
12chrome_options.add_argument("--no-sandbox")
13chrome_options.add_argument("--disable-notifications")
14chrome_options.add_experimental_option('excludeSwitches', ['enable-logging'])
15chrome_options.add_experimental_option("excludeSwitches", ["enable-automation"])
16chrome_options.add_experimental_option('useAutomationExtension', False)
17driver = webdriver.Chrome(options=chrome_options,executable_path="chromedriver.exe")
18driver.get("https://www.linkedin.com/")  WebDriverWait(driver,5).until(EC.visibility_of_all_elements_located((By.CSS_SELECTOR,"#session_key")))
19driver.find_element_by_css_selector('#session_key').send_keys(email)
20driver.find_element_by_css_selector('#session_password').send_keys(password)
21driver.find_element_by_css_selector("body > main > section.section.section--hero > div.sign-in-form-container > form > button").click()
22WebDriverWait(driver, 100).until(EC.presence_of_element_located((By.ID, "global-nav")))
23print("Login Successful.")
24
similar questions