Commit e3a96b68 authored by nanahira's avatar nanahira

arkose token is gone

parent 035265c9
...@@ -1616,21 +1616,11 @@ var ChatGPTAPIBrowser = class extends AChatGPTAPI { ...@@ -1616,21 +1616,11 @@ var ChatGPTAPIBrowser = class extends AChatGPTAPI {
} }
} }
try { 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( result = await this._page.evaluate(
browserPostEventStream, browserPostEventStream,
url2, url2,
this._accessToken, this._accessToken,
{ ...body, arkose_token: (await req.json()).token }, { ...body, arkose_token: null },
timeoutMs timeoutMs
); );
} catch (err) { } 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 { ...@@ -557,6 +557,7 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI {
}, beforeUrl) }, beforeUrl)
*/ */
/*
const reqProm = this._page.waitForResponse( const reqProm = this._page.waitForResponse(
(res) => (res) =>
res res
...@@ -572,13 +573,14 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI { ...@@ -572,13 +573,14 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI {
await textarea.type('a') await textarea.type('a')
await this._page.keyboard.press('Backspace') await this._page.keyboard.press('Backspace')
const req = await reqProm const req = await reqProm
*/
// console.log('>>> EVALUATE', url, this._accessToken, body) // console.log('>>> EVALUATE', url, this._accessToken, body)
result = await this._page.evaluate( result = await this._page.evaluate(
browserPostEventStream, browserPostEventStream,
url, url,
this._accessToken, this._accessToken,
{ ...body, arkose_token: (await req.json()).token }, { ...body, arkose_token: null /*(await req.json()).token*/ },
timeoutMs timeoutMs
) )
} catch (err) { } 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