Commit 9aeb17e7 authored by Travis Fischer's avatar Travis Fischer

fix: minor fix for timeouts

parent b4f1ff79
......@@ -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/) 🔥
......
......@@ -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)
......
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