Removed 'seen here' Jeopardy questions referring to a non-existent image.
This commit is contained in:
parent
b74e3ea861
commit
ebe1226cb8
|
@ -9,8 +9,7 @@ async function init() {
|
|||
const curatedQuestions = await Promise.all(questions.map(async (question) => {
|
||||
const links = linkify.match(question.question);
|
||||
|
||||
if (links?.length > 0 || /\[jpe?g\]/.test(question.question)) {
|
||||
console.log(`Discarding question due URL: ${question.question}`);
|
||||
if (links?.length > 0 || /\[jpe?g\]|seen here/i.test(question.question)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -25,7 +24,11 @@ async function init() {
|
|||
};
|
||||
}));
|
||||
|
||||
await fs.writeFile('assets/jeopardy.json', JSON.stringify(curatedQuestions.filter(Boolean), null, 4));
|
||||
const filteredQuestions = curatedQuestions.filter(Boolean);
|
||||
|
||||
await fs.writeFile('assets/jeopardy.json', JSON.stringify(filteredQuestions, null, 4));
|
||||
|
||||
console.log(`Saved ${filteredQuestions.length} questions, discarded ${questions.length - filteredQuestions.length}`);
|
||||
}
|
||||
|
||||
init();
|
||||
|
|
21930
assets/jeopardy.json
21930
assets/jeopardy.json
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue