Skip to content

Commit 9aeb17e

Browse files
fix: minor fix for timeouts
1 parent b4f1ff7 commit 9aeb17e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ This package is ESM-only. It supports:
315315

316316
## Credits
317317

318-
- 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 💪
318+
- 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 💪
319319
- The original browser version was inspired by this [Go module](https://github.com/danielgross/whatsapp-gpt) by [Daniel Gross](https://github.com/danielgross)
320320
- [OpenAI](https://openai.com) for creating [ChatGPT](https://openai.com/blog/chatgpt/) 🔥
321321

src/chatgpt-api-browser.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ export class ChatGPTAPIBrowser {
8888

8989
if (url !== chatUrl) {
9090
await this._page.goto(chatUrl, {
91-
waitUntil: 'networkidle0'
91+
waitUntil: 'networkidle2'
9292
})
9393
}
9494

95-
// dismiss welcome modal
95+
// dismiss welcome modal (and other modals)
9696
do {
9797
const modalSelector = '[data-headlessui-state="open"]'
9898

@@ -107,7 +107,7 @@ export class ChatGPTAPIBrowser {
107107
break
108108
}
109109

110-
await delay(500)
110+
await delay(300)
111111
} while (true)
112112

113113
if (!this.getIsAuthenticated()) {
@@ -206,7 +206,7 @@ export class ChatGPTAPIBrowser {
206206
try {
207207
await maximizePage(this._page)
208208
await this._page.reload({
209-
waitUntil: 'networkidle0',
209+
waitUntil: 'networkidle2',
210210
timeout: 2 * 60 * 1000 // 2 minutes
211211
})
212212
await minimizePage(this._page)

0 commit comments

Comments
 (0)