Selenium打开网页后提示您的连接不是私密连接
在使用selenium时,遇到如图:
解决方案:
添加options参数:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'tian'
__data__ = '2021/2/24 17:06'
import time
from selenium import webdriver
# 添加options参数
options = webdriver.ChromeOptions()
options.add_argument("--ignore-certificate-errors")
driver = webdriver.Chrome(options=options)
driver.maximize_window()
try:
driver.get("https://mail.jjl.cn/owa/")
time.sleep(2)
except Exception as error:
print("报错信息:{0}".format(error))
finally:
time.sleep(10)
driver.quit()