Python+selenium启动Chrome时Chrome Automation Extension
程序员文章站
2022-06-11 15:02:09
...
查看Chrome设置文件
查看Chrome版本及个人账户信息
chrome://version/
py文件设置
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument(" -no-sandbox") # Chrome 无法打开设置
chrome_options.add_argument(r'--user-data-dir=C:\Users\Administrator\AppData\Local\Google\Chrome\User Data') # 设置个人Chrome浏览器账户信息
chrome_options.add_argument(r'--profile-directory=Default')
driver = webdriver.Chrome(chrome_options=chrome_options)
driver = webdriver.Chrome(r'D:\software\Python\Python37-32\Scripts\chromedriver.exe')
driver.get('https://XXXXXXX')