auto-chrome
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -229,4 +229,7 @@ "use strict"; | ||
// 忽略https错误 | ||
if (this.ignoreHTTPSErrors) { | ||
list.push(page.send('Security.enable')); | ||
if (this.ignoreHTTPSErrors === true) { | ||
list.push( | ||
page.send('Security.disable'), | ||
page.send('Security.setOverrideCertificateErrors', { override: true }) | ||
); | ||
} | ||
@@ -233,0 +236,0 @@ |
@@ -23,2 +23,6 @@ "use strict"; | ||
if (objectId === undefined) { | ||
throw new Error(`缺少objectId参数!`) | ||
} | ||
const { result } = await this.page.send('Runtime.callFunctionOn', { | ||
@@ -25,0 +29,0 @@ objectId, |
@@ -81,6 +81,7 @@ "use strict" | ||
if (error instanceof Object) { | ||
logger.error(new Error(Object.values(error).toString())); | ||
logger.error(method, params); | ||
logger.error(String(Object.values(error))); | ||
return { error } | ||
} else { | ||
logger.error(new Error(error)); | ||
logger.error(String(error)); | ||
return { error } | ||
} | ||
@@ -87,0 +88,0 @@ }) |
{ | ||
"name": "auto-chrome", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "使用Node.js操作Chrome或Chromium,高仿真的用户行为模拟器", | ||
@@ -5,0 +5,0 @@ "main": "lib/", |
@@ -132,4 +132,6 @@ # auto-chrome | ||
* `ignoreHTTPSErrors` *Boolean* 忽略https错误,默认true | ||
* `ignoreHTTPSErrors` *Boolean* 忽略https错误,默认false | ||
* `disableDownload` *Boolean* 禁止下载文件,默认false | ||
* `loadTimeout` *Number* 自动导航等待页面加载的最大停留时间,单位ms | ||
@@ -136,0 +138,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84443
1998
431