option = webdriver.ChromeOptions()
option.add_experimental_option("detach", True)
driver = webdriver.Chrome('D:\driver\chromedriver.exe',options=option)
driver.get('https://********')
chromedriver.exe在Python的安装目录下
详情:解决selenium自动关闭浏览器_Ashely的博客-CSDN博客_selenium自动关闭浏览器