mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge pull request #738 from BlueprintCoding/patch-2
Update poe-client.js
This commit is contained in:
@@ -382,6 +382,7 @@ class Client {
|
|||||||
console.log('Client initialized.');
|
console.log('Client initialized.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
get_device_id() {
|
get_device_id() {
|
||||||
const user_id = this.viewer["poeUser"]["id"];
|
const user_id = this.viewer["poeUser"]["id"];
|
||||||
const device_id = getSavedDeviceId(user_id);
|
const device_id = getSavedDeviceId(user_id);
|
||||||
@@ -397,7 +398,7 @@ class Client {
|
|||||||
const botNameKeyName = 'chatOfBotHandle'
|
const botNameKeyName = 'chatOfBotHandle'
|
||||||
const defaultBotKeyName = 'defaultBotNickname'
|
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 jsonRegex = /<script id="__NEXT_DATA__" type="application\/json">(.+?)<\/script>/;
|
||||||
const jsonText = jsonRegex.exec(r.data)[1];
|
const jsonText = jsonRegex.exec(r.data)[1];
|
||||||
const nextData = JSON.parse(jsonText);
|
const nextData = JSON.parse(jsonText);
|
||||||
|
Reference in New Issue
Block a user