Just another package for generate a fake userAgent to bypass some guys
npm install fake-useragent
const fakeUa = require('fake-useragent');
console.log(fakeUa());
const fakeUa = require('fake-useragent');
const request = require('request');
var url = 'https://www.google.com.vn/search?safe=off&hl=en&q=hello';
var headers = {
'User-Agent': fakeUa()
};
request.get({ url: url, headers: headers }, function (e, r, body) {
console.log(r, body)
});