From 061f8de0ca16b5e8e82fc9435ab73ae0bc8f304b Mon Sep 17 00:00:00 2001 From: MillenniumEarl Date: Thu, 12 Nov 2020 14:20:35 +0100 Subject: [PATCH] Search for the exact name --- app/scripts/searcher.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scripts/searcher.js b/app/scripts/searcher.js index f310669..cfafff6 100644 --- a/app/scripts/searcher.js +++ b/app/scripts/searcher.js @@ -23,7 +23,7 @@ module.exports.searchGame = async function (name) { const searchName = encodeURIComponent(name.toUpperCase()); // Prepare the URL (only title, search in the "Games" section, order by relevance) - const url = `https://f95zone.to/search/83456043/?q=${searchName}&t=post&c[child_nodes]=1&c[nodes][0]=2&c[title_only]=1&o=relevance`; + const url = `https://f95zone.to/search/83456043/?q="${searchName}"&t=post&c[child_nodes]=1&c[nodes][0]=2&c[title_only]=1&o=relevance`; // Fetch and parse the result URLs return await fetchResultURLs(url); @@ -42,7 +42,7 @@ module.exports.searchMod = async function (name) { const searchName = encodeURIComponent(name.toUpperCase()); // Prepare the URL (only title, search in the "Mods" section, order by relevance) - const url = `https://f95zone.to/search/83459796/?q=${searchName}&t=post&c[child_nodes]=1&c[nodes][0]=41&c[title_only]=1&o=relevance`; + const url = `https://f95zone.to/search/83459796/?q="${searchName}"&t=post&c[child_nodes]=1&c[nodes][0]=41&c[title_only]=1&o=relevance`; // Fetch and parse the result URLs return await fetchResultURLs(url);