nodejs-web-scraper
Advanced tools
Comparing version 6.1.2 to 6.1.3
@@ -201,3 +201,3 @@ const HttpOperation = require('./HttpOperation'); | ||
proxy: this.scraper.config.proxy, | ||
agent: this.scraper.config.agent | ||
} | ||
@@ -204,0 +204,0 @@ |
@@ -107,3 +107,4 @@ const { request } = require('../../request/request.js'); | ||
headers: this.Operation.scraper.config.headers, | ||
proxy: this.Operation.scraper.config.proxy | ||
proxy: this.Operation.scraper.config.proxy, | ||
agent: this.Operation.scraper.config.agent | ||
@@ -110,0 +111,0 @@ }) |
{ | ||
"name": "nodejs-web-scraper", | ||
"version": "6.1.2", | ||
"version": "6.1.3", | ||
"description": "A web scraper for NodeJs", | ||
@@ -38,2 +38,2 @@ "main": "index.js", | ||
} | ||
} | ||
} |
@@ -6,3 +6,3 @@ | ||
const { verifyDirectoryExists } = require('./utils/files') | ||
const { deepSpread } = require('./utils/objects') | ||
const { deepSpread } = require('./utils/objects'); | ||
@@ -31,2 +31,3 @@ /** | ||
* @param {string} [globalConfig.proxy = null] | ||
* @param {http.Agent} [globalConfig.agent = null] | ||
* @param {Function} [globalConfig.onError = null] | ||
@@ -65,4 +66,9 @@ */ | ||
this.validateGlobalConfig(globalConfig); | ||
deepSpread(this.config, globalConfig) | ||
deepSpread(this.config,globalConfig) | ||
if (globalConfig.agent) { | ||
this.config.agent = globalConfig.agent; | ||
} | ||
this.config.errorCodesToSkip = [404, 403, 400]; | ||
@@ -69,0 +75,0 @@ |
89442
1480