Commit e3a96b68 authored by nanahira's avatar nanahira

arkose token is gone

parent 035265c9
......@@ -1616,21 +1616,11 @@ var ChatGPTAPIBrowser = class extends AChatGPTAPI {
}
}
try {
const reqProm = this._page.waitForResponse(
(res) => res.url().startsWith("https://tcr9i.chat.openai.com/fc/gt2/public_key/"),
{ timeout: 1e4 }
);
const textarea = await this._page.waitForSelector(
'textarea[id="prompt-textarea"]'
);
await textarea.type("a");
await this._page.keyboard.press("Backspace");
const req = await reqProm;
result = await this._page.evaluate(
browserPostEventStream,
url2,
this._accessToken,
{ ...body, arkose_token: (await req.json()).token },
{ ...body, arkose_token: null },
timeoutMs
);
} catch (err) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -557,6 +557,7 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI {
}, beforeUrl)
*/
/*
const reqProm = this._page.waitForResponse(
(res) =>
res
......@@ -572,13 +573,14 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI {
await textarea.type('a')
await this._page.keyboard.press('Backspace')
const req = await reqProm
*/
// console.log('>>> EVALUATE', url, this._accessToken, body)
result = await this._page.evaluate(
browserPostEventStream,
url,
this._accessToken,
{ ...body, arkose_token: (await req.json()).token },
{ ...body, arkose_token: null /*(await req.json()).token*/ },
timeoutMs
)
} catch (err) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment