From 22e9e6b584e7a12c3c251088d0e3d650509f20e2 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Thu, 4 Apr 2024 17:26:09 -0400 Subject: [PATCH] Fix --- commands/events/florida-man.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/events/florida-man.js b/commands/events/florida-man.js index 1d04c340..8b01c16b 100644 --- a/commands/events/florida-man.js +++ b/commands/events/florida-man.js @@ -56,8 +56,8 @@ module.exports = class FloridaManCommand extends Command { const { text } = await request.get(`https://floridamanbirthday.org/${months[month - 1]}-${day}`); const $ = cheerio.load(text); const result = { - title: decodeHTML($('p').first().children().first().text()), - firstLine: decodeHTML($('p').eq(1).children().first().text()), + title: decodeHTML($('p').first().text().replace(/\n/g, ' ')), + firstLine: decodeHTML($('p').eq(1).text().replace(/\n/g, ' ')), image: `https:${$('img').eq(1).attr('data-lazy-src')}` }; this.cache.set(`${month}-${day}`, result);