From c91471a0b2750977727438b46e445fe1017297d0 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Fri, 28 Feb 2020 14:03:11 +0100 Subject: [PATCH] remove user agent from config --- conf/config.example | 1 - conf/forTesting/config.multi.test.json | 1 - lib/services/scraper.js | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/conf/config.example b/conf/config.example index fa9d925..d121ada 100755 --- a/conf/config.example +++ b/conf/config.example @@ -1,6 +1,5 @@ { "interval": 1, - "userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.85 Safari/537.36", "jobs": { "yourSearchJob": { "notification": { diff --git a/conf/forTesting/config.multi.test.json b/conf/forTesting/config.multi.test.json index 791e00d..42aece5 100755 --- a/conf/forTesting/config.multi.test.json +++ b/conf/forTesting/config.multi.test.json @@ -1,6 +1,5 @@ { "interval": 1, - "userAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.85 Safari/537.36", "jobs": { "test1": { "notification": { diff --git a/lib/services/scraper.js b/lib/services/scraper.js index b26d696..0f19c84 100755 --- a/lib/services/scraper.js +++ b/lib/services/scraper.js @@ -1,5 +1,4 @@ const makeDriver = require('request-x-ray'); -const config = require('../../conf/config.json'); const Xray = require('x-ray'); class Scraper { @@ -12,7 +11,8 @@ class Scraper { const driver = makeDriver({ headers: { - 'User-Agent': config.userAgent + 'User-Agent': + 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.85 Safari/537.36' } });