I used seleniumwire+chromedriver to access the login page of the target site, but the link couldn’t be established. I’ve taken some steps to prevent the server from detecting that I’m using selenium, but it doesn’t seem to be working.When I used Google to visit the target site, it worked.The website I visited has strict security inspection, and it needs to install relevant certificates and insert UK to log in. However, unrelated personnel can still access the landing page normally. Now I am faced with the problem that even the landing page cannot be accessed.
enter image description here
I used the following methods to fake selenium:
type Python
def creat_driver():
chrome_options = Options()
chrome_options.add_experimental_option("excludeSwitches", ["enable-automation"])
# chrome_options.add_argument("--headless")
chrome_options.add_experimental_option('useAutomationExtension', False)
chrome_options.add_argument("--disable-gpu")
chrome_options.add_argument("disable-blink-features=AutomationControlled")
ser = Service(executable_path=config_info['chromedriver_path'])
driver = webdriver.Chrome(service=ser, options=chrome_options)
driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: () => undefined});")
driver.maximize_window()
return driver
I went to the console and tried to find selenium’s fingerprint. It wasn’t there, but it still didn’t work.
enter image description here
chen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
It seems like the target site has strict security measures that go beyond just detecting Selenium’s webdriver. While your code to bypass detection looks good, you may need to install the site’s required certificates or use specific headers related to their security protocols. I recommend trying to mimic browser requests more closely using tools like undetected-chromedriver. It can help bypass certain bot detections.
You could also look into whether the site has extra protection, such as anti-bot systems like Cloudflare
Hassan Farooq is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.