This commit is contained in:
Ashley Graves 2024-10-16 01:33:42 +02:00
parent dc71b78d2f
commit e50061a99c

View file

@ -47,9 +47,6 @@ module.exports = {
const embeds = []; const embeds = [];
const data = await (await fetch(`${process.env.SEARXNG_INSTANCE}/search?${queryString}`)).json(); const data = await (await fetch(`${process.env.SEARXNG_INSTANCE}/search?${queryString}`)).json();
for (const result of data.results) { for (const result of data.results) {
if (result.magnetlink)
result.magnetlink = `[${result.magnetlink.slice(0, result.magnetlink.indexOf("&"))}](${process.env.BASE_URL}/magnet/${result.magnetlink})`;
if (result.publishedDate) if (result.publishedDate)
result.publishedDate = new Date(result.publishedDate).toLocaleDateString('en-us', { weekday: "long", year: "numeric", month: "short", day: "numeric" }); result.publishedDate = new Date(result.publishedDate).toLocaleDateString('en-us', { weekday: "long", year: "numeric", month: "short", day: "numeric" });