📜  此浏览器或应用程序可能不是安全的 selenium - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:04.440000             🧑  作者: Mango

代码示例1
# initiate the driver with undetetcted_chromedriver
import undetected_chromedriver.v2 as uc
driver = uc.Chrome()

# operate the driver as you would with selenium
driver.get('https://my-url.com') 

# Example use of selenium imports to be used with the driver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.by import By

try:
    driver.find_element(By.XPATH, '//*[@id="my-id"]').click()
except NoSuchElementException:
    print("No Such Element Exception")