From 2be07a38cc09765681b584ab279261eef750be5c Mon Sep 17 00:00:00 2001 From: MillenniumEarl Date: Wed, 3 Mar 2021 21:16:30 +0100 Subject: [PATCH] Fix invalid URL --- src/scripts/constants/url.ts | 2 +- src/scripts/fetch-data/fetch-thread.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scripts/constants/url.ts b/src/scripts/constants/url.ts index 4889b8a..1d76398 100644 --- a/src/scripts/constants/url.ts +++ b/src/scripts/constants/url.ts @@ -1,6 +1,6 @@ export const urls = { F95_BASE_URL: "https://f95zone.to", - F95_SEARCH_URL: "https://f95zone.to/search", + F95_SEARCH_URL: "https://f95zone.to/search/105286576/", F95_LATEST_UPDATES: "https://f95zone.to/latest", F95_THREADS: "https://f95zone.to/threads/", F95_LOGIN_URL: "https://f95zone.to/login/login", diff --git a/src/scripts/fetch-data/fetch-thread.ts b/src/scripts/fetch-data/fetch-thread.ts index df05861..9a86b97 100644 --- a/src/scripts/fetch-data/fetch-thread.ts +++ b/src/scripts/fetch-data/fetch-thread.ts @@ -20,10 +20,10 @@ import ThreadSearchQuery from "../classes/query/thread-search-query.js"; * Maximum number of items to get. Default: 30 * @returns {Promise} URLs of the handiworks */ -export default async function fetchThreadHandiworkURLs(query: ThreadSearchQuery, limit:number = 30): Promise { +export default async function fetchThreadHandiworkURLs(query: ThreadSearchQuery, limit: number = 30): Promise { // Get the query - const url = query.createURL().toString(); - + const url = decodeURI(query.createURL().href); + // Fetch the results from F95 and return the handiwork urls return await fetchResultURLs(url, limit); }