This commit is contained in:
Dragon Fire
2024-04-04 17:26:09 -04:00
parent 4e5bef2395
commit 22e9e6b584
+2 -2
View File
@@ -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);