mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 22:32:52 +02:00
Fix
This commit is contained in:
@@ -88,7 +88,7 @@ module.exports = class TwentyQuestionsCommand extends Command {
|
|||||||
|
|
||||||
async initialize(game) {
|
async initialize(game) {
|
||||||
const { text } = await request
|
const { text } = await request
|
||||||
.get(`${this.makeBaseURI(game)}/gsq${game ? '' : '-en'}`)
|
.get(`${this.makeBaseURI(game)}/gs${game ? 'e' : 'q-en'}`)
|
||||||
.set({ Referer: 'http://www.20q.net/' });
|
.set({ Referer: 'http://www.20q.net/' });
|
||||||
const $ = cheerio.load(text);
|
const $ = cheerio.load(text);
|
||||||
return $('form').first().attr('action');
|
return $('form').first().attr('action');
|
||||||
@@ -99,7 +99,7 @@ module.exports = class TwentyQuestionsCommand extends Command {
|
|||||||
.post(`${this.makeBaseURI(game)}${startURL}`)
|
.post(`${this.makeBaseURI(game)}${startURL}`)
|
||||||
.set({
|
.set({
|
||||||
Origin: `${this.makeBaseURI(game)}/`,
|
Origin: `${this.makeBaseURI(game)}/`,
|
||||||
Referer: `${this.makeBaseURI(game)}/gsq${game ? '' : '-en'}`
|
Referer: `${this.makeBaseURI(game)}/gs${game ? 'e' : 'q-en'}`
|
||||||
})
|
})
|
||||||
.attach({
|
.attach({
|
||||||
submit: ' Play ',
|
submit: ' Play ',
|
||||||
|
|||||||
Reference in New Issue
Block a user