From b1aa1c1b8d0cb0ac5d21ed06a0c27d7b12726763 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Thu, 11 Mar 2021 19:14:54 -0500 Subject: [PATCH] fix --- commands/search/google.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/search/google.js b/commands/search/google.js index b040dfe3..40ee6977 100644 --- a/commands/search/google.js +++ b/commands/search/google.js @@ -1,6 +1,7 @@ const Command = require('../../structures/Command'); const request = require('node-superfetch'); const cheerio = require('cheerio'); +const { URLSearchParams } = require('url'); module.exports = class GoogleCommand extends Command { constructor(client) { @@ -63,7 +64,8 @@ module.exports = class GoogleCommand extends Command { if ($(h3).parent()) { const href = $(h3).parent().attr('href'); if (href) { - links.push(href); + const params = new URLSearchParams(href); + links.push(params.url); } } });