Update poe-client.js

Fixed poe by changing Get request to a Post request
This commit is contained in:
Blueprint Coding
2023-07-18 22:33:38 -06:00
committed by GitHub
parent 2befcd8712
commit f339f28b05

View File

@@ -381,6 +381,7 @@ class Client {
await this.connect_ws();
console.log('Client initialized.');
}
get_device_id() {
const user_id = this.viewer["poeUser"]["id"];
@@ -397,7 +398,7 @@ class Client {
const botNameKeyName = 'chatOfBotHandle'
const defaultBotKeyName = 'defaultBotNickname'
const r = await request_with_retries(() => this.session.get(this.home_url));
const r = await request_with_retries(() => this.session.post(this.home_url));
const jsonRegex = /<script id="__NEXT_DATA__" type="application\/json">(.+?)<\/script>/;
const jsonText = jsonRegex.exec(r.data)[1];
const nextData = JSON.parse(jsonText);