Fix Final Jeopardy not scraping

This commit is contained in:
lilyissillyyy
2025-08-22 21:53:15 -04:00
parent 0a4f259554
commit 4d2c1c29b1
3 changed files with 17 additions and 11 deletions
+2 -2
View File
@@ -49,12 +49,12 @@ module.exports = class JeopardyScrape {
const value = $(elem).find('td[class="clue_value"]').text();
const question = $(elem).find('td[class="clue_text"]').first().text();
const answer = $(elem).find('em[class="correct_response"]').text();
if (!question || !answer || !value) return;
if (!question || !answer) return;
clues.push({
question,
answer,
category: categoryArr[i % 6],
value: value.match(/[0-9]+/)[0],
value: value ? value.match(/[0-9]+/)[0] : '0',
gameID: id
});
});