diff --git a/lib/consumer.js b/lib/consumer.js index 14f4b6d..6abb946 100644 --- a/lib/consumer.js +++ b/lib/consumer.js @@ -188,9 +188,9 @@ class Consumer { url: task.url, targets: task.targets, actions: task.actions, - userAgent: task.userAgent, - deviceType: task.deviceType, - customHeaders: task.customHeaders + userAgent: this.userAgent, + deviceType: this.deviceType, + customHeaders: this.customHeaders, }; let spider = new Spider(sOpt); spider.parseHtml = this.beforeParseHtml;