kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
fix: add slight delay for password => login click
rodzic
158cc7fb56
commit
b6649b9484
|
@ -147,25 +147,27 @@ export async function getOpenAIAuth({
|
||||||
})
|
})
|
||||||
await page.click('button[data-provider="google"]')
|
await page.click('button[data-provider="google"]')
|
||||||
await page.waitForSelector('input[type="email"]')
|
await page.waitForSelector('input[type="email"]')
|
||||||
await page.type('input[type="email"]', email, { delay: 10 })
|
await page.type('input[type="email"]', email)
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
page.waitForNavigation(),
|
page.waitForNavigation(),
|
||||||
await page.keyboard.press('Enter')
|
await page.keyboard.press('Enter')
|
||||||
])
|
])
|
||||||
await page.waitForSelector('input[type="password"]', { visible: true })
|
await page.waitForSelector('input[type="password"]', { visible: true })
|
||||||
await page.type('input[type="password"]', password, { delay: 10 })
|
await page.type('input[type="password"]', password)
|
||||||
|
await delay(50)
|
||||||
submitP = () => page.keyboard.press('Enter')
|
submitP = () => page.keyboard.press('Enter')
|
||||||
} else if (isMicrosoftLogin) {
|
} else if (isMicrosoftLogin) {
|
||||||
await page.click('button[data-provider="windowslive"]')
|
await page.click('button[data-provider="windowslive"]')
|
||||||
await page.waitForSelector('input[type="email"]')
|
await page.waitForSelector('input[type="email"]')
|
||||||
await page.type('input[type="email"]', email, { delay: 10 })
|
await page.type('input[type="email"]', email)
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
page.waitForNavigation(),
|
page.waitForNavigation(),
|
||||||
await page.keyboard.press('Enter')
|
await page.keyboard.press('Enter')
|
||||||
])
|
])
|
||||||
await delay(1500)
|
await delay(1500)
|
||||||
await page.waitForSelector('input[type="password"]', { visible: true })
|
await page.waitForSelector('input[type="password"]', { visible: true })
|
||||||
await page.type('input[type="password"]', password, { delay: 10 })
|
await page.type('input[type="password"]', password)
|
||||||
|
await delay(50)
|
||||||
submitP = () => page.keyboard.press('Enter')
|
submitP = () => page.keyboard.press('Enter')
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
page.waitForNavigation(),
|
page.waitForNavigation(),
|
||||||
|
@ -210,7 +212,8 @@ export async function getOpenAIAuth({
|
||||||
await submit.focus()
|
await submit.focus()
|
||||||
await submit.click()
|
await submit.click()
|
||||||
await page.waitForSelector('#password', { timeout: timeoutMs })
|
await page.waitForSelector('#password', { timeout: timeoutMs })
|
||||||
await page.type('#password', password, { delay: 10 })
|
await page.type('#password', password)
|
||||||
|
await delay(50)
|
||||||
submitP = () => page.click('button[type="submit"]')
|
submitP = () => page.click('button[type="submit"]')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue