diff --git a/legacy/readme.md b/legacy/readme.md index 97b678de..7a9b7862 100644 --- a/legacy/readme.md +++ b/legacy/readme.md @@ -315,7 +315,7 @@ This package is ESM-only. It supports: ## Credits -- Huge thanks to [@waylaidwanderer](https://github.com/waylaidwanderer), [@wong2](https://github.com/wong2), [@simon300000](https://github.com/simon300000), [@RomanHotsiy](https://github.com/RomanHotsiy), [@ElijahPepe](https://github.com/ElijahPepe), and all the other contributors 💪 +- Huge thanks to [@abacaj](https://github.com/abacaj), [@waylaidwanderer](https://github.com/waylaidwanderer), [@wong2](https://github.com/wong2), [@simon300000](https://github.com/simon300000), [@RomanHotsiy](https://github.com/RomanHotsiy), [@ElijahPepe](https://github.com/ElijahPepe), and all the other contributors 💪 - The original browser version was inspired by this [Go module](https://github.com/danielgross/whatsapp-gpt) by [Daniel Gross](https://github.com/danielgross) - [OpenAI](https://openai.com) for creating [ChatGPT](https://openai.com/blog/chatgpt/) 🔥 diff --git a/legacy/src/chatgpt-api-browser.ts b/legacy/src/chatgpt-api-browser.ts index 6c2ef65e..19c506db 100644 --- a/legacy/src/chatgpt-api-browser.ts +++ b/legacy/src/chatgpt-api-browser.ts @@ -88,11 +88,11 @@ export class ChatGPTAPIBrowser { if (url !== chatUrl) { await this._page.goto(chatUrl, { - waitUntil: 'networkidle0' + waitUntil: 'networkidle2' }) } - // dismiss welcome modal + // dismiss welcome modal (and other modals) do { const modalSelector = '[data-headlessui-state="open"]' @@ -107,7 +107,7 @@ export class ChatGPTAPIBrowser { break } - await delay(500) + await delay(300) } while (true) if (!this.getIsAuthenticated()) { @@ -206,7 +206,7 @@ export class ChatGPTAPIBrowser { try { await maximizePage(this._page) await this._page.reload({ - waitUntil: 'networkidle0', + waitUntil: 'networkidle2', timeout: 2 * 60 * 1000 // 2 minutes }) await minimizePage(this._page)