Today, I found that the crawler widget I wrote before is not working again. It turns out that chrome has been updated again, causing the previous Selenium script to fail.

From the Internet to find the next scheme, details refer to: blog.csdn.net/qq_35866846…

Directly on the code:

from selenium import webdriver

chrome_options = webdriver.ChromeOptions() 
chrome_options.add_experimental_option('excludeSwitches'['enable-automation']) 
chrome_options.add_argument("--disable-blink-features=AutomationControlled")
driver = webdriver.Chrome(options=chrome_options)
        
Copy the code

Hiding success: