From b246084fc4c12976685481599c41b1c7b2d516a8 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 17 Apr 2021 13:48:56 -0400 Subject: [PATCH] Fix --- commands/games-sp/20-questions.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/games-sp/20-questions.js b/commands/games-sp/20-questions.js index cafe4459..82e732cf 100644 --- a/commands/games-sp/20-questions.js +++ b/commands/games-sp/20-questions.js @@ -107,9 +107,10 @@ module.exports = class TwentyQuestionsCommand extends Command { cctkr: 'US,AR,VI,GB,AF,PL' }); const $ = cheerio.load(text); - const resultText = $('big').eq(2).children().first(); + const i = game === 'starwars' || game === 'marvel' ? 5 : 2; + const resultText = $('big').eq(i).children().first(); const answers = []; - $(resultText).find('a').each((i, elem) => { + $(resultText).find('a').each((j, elem) => { const href = `${this.makeBaseURI(game)}${$(elem).attr('href')}`; answers.push({ href, text: $(elem).text().trim() }); });