start chrome.exe --unsafely-treat-insecure-origin-as-secure="目标网站"
某网站无法手动直接打开,但cmd运行上述命令可以,想用selenium控制,但对待96版谷歌没戏,这代码该如何改写?
from selenium import webdriver
from selenium.webdriver.chrome import options
from selenium.webdriver.chrome.options import Options
chrome_options=Options()
chrome_options.add_argument=' --unsafely-treat-insecure-origin-as-secure="http://目标网址"'
driver=webdriver.Chrome('d:/xxx/chromedriver.exe',options=chrome_options)
driver.get("http://目标网址")
我的chrome是
运行你的上述代码,打开百度没有问题

你看下是不是其他原因