Solve SSL Error

This commit is contained in:
naibo
2023-06-24 21:06:29 +08:00
parent e71cd50995
commit 83d9c9a626
6 changed files with 10 additions and 2 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+5 -2
View File
@@ -916,7 +916,7 @@ class BrowserThread(Thread):
# 提取数据事件
def getData(self, para, loopElement, isInLoop=True, parentPath="", index=0):
for p in para["paras"]:
for p in para["paras"]: # 加并行处理
content = ""
if not (p["contentType"] == 5 or p["contentType"] == 6): # 如果不是页面标题或URL,去找元素
try:
@@ -1075,7 +1075,10 @@ if __name__ == '__main__':
option.add_experimental_option(
'excludeSwitches', ['enable-automation']) # 以开发者模式
options.add_argument('-ignore-certificate-errors')
options.add_argument('-ignore -ssl-errors')
option.add_argument('-ignore-certificate-errors')
option.add_argument('-ignore -ssl-errors')
# user_data_dir = r'' # 注意没有Default
# options.add_argument('--user-data-dir='+p)