mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
fix: add loop to ensure login
This commit is contained in:
parent
053a43fcc1
commit
2657dead17
1 changed files with 10 additions and 8 deletions
|
|
@ -61,14 +61,16 @@ export async function getOpenAIAuth (opt) {
|
|||
await delay(500)
|
||||
|
||||
// click login button and wait for navigation to finish
|
||||
do {
|
||||
await Promise.all([
|
||||
page.waitForNavigation({
|
||||
waitUntil: 'networkidle2',
|
||||
timeout: timeoutMs
|
||||
}),
|
||||
|
||||
page.click('#__next .btn-primary')
|
||||
])
|
||||
await delay(500)
|
||||
} while (page.url().endsWith('/auth/login'))
|
||||
|
||||
await checkForChatGPTAtCapacity(page)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue