eg: catch pending optional promise to avoid time out
This commit is contained in:
parent
a4d39b6a6e
commit
67ccf032e5
1 changed files with 1 additions and 1 deletions
|
|
@ -86,7 +86,7 @@ try {
|
||||||
await page.click('button[type="submit"]');
|
await page.click('button[type="submit"]');
|
||||||
page.waitForSelector('#h_captcha_challenge_login_prod iframe').then(() => {
|
page.waitForSelector('#h_captcha_challenge_login_prod iframe').then(() => {
|
||||||
console.log('Got a captcha! You may have to solve it in the browser if the NopeCHA extension fails to do so.');
|
console.log('Got a captcha! You may have to solve it in the browser if the NopeCHA extension fails to do so.');
|
||||||
});
|
}).catch(_ => { });
|
||||||
// handle MFA, but don't await it
|
// handle MFA, but don't await it
|
||||||
page.waitForNavigation({ url: '**/id/login/mfa**'}).then(async () => {
|
page.waitForNavigation({ url: '**/id/login/mfa**'}).then(async () => {
|
||||||
console.log('Enter the security code to continue - This appears to be a new device, browser or location. A security code has been sent to your email address at ...');
|
console.log('Enter the security code to continue - This appears to be a new device, browser or location. A security code has been sent to your email address at ...');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue