Fake User-Agent Based on My Own

This commit is contained in:
Daniel Odendahl Jr
2017-04-10 11:22:21 +00:00
parent eb27a78ece
commit bc011aa213
+3
View File
@@ -33,6 +33,9 @@ module.exports = class GoogleCommand extends commando.Command {
.get(`https://www.google.com/search`)
.query({
q: thingToSearch
})
.set({
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.138 Safari/537.36 Vivaldi/1.8.770.54'
});
const $ = cheerio.load(response.text);
let href = $('.r').first().find('a').first().attr('href');