Removed 'seen here' Jeopardy questions referring to a non-existent image.

This commit is contained in:
ThePendulum 2021-11-15 00:38:50 +01:00
parent b74e3ea861
commit ebe1226cb8
2 changed files with 6 additions and 21933 deletions

View File

@ -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();

File diff suppressed because it is too large Load Diff