Address Sonar warnings and harden runtime
This commit is contained in:
parent
9e2bc89ff2
commit
69282c63d5
5 changed files with 25 additions and 9 deletions
|
|
@ -40,7 +40,7 @@ const auth = async url => {
|
|||
console.log('auth', url);
|
||||
await page.goto(url, { waitUntil: 'domcontentloaded' });
|
||||
// redirects to https://login.aliexpress.com/?return_url=https%3A%2F%2Fwww.aliexpress.com%2Fp%2Fcoin-pc-index%2Findex.html
|
||||
await Promise.any([page.waitForURL(/.*login\.aliexpress.com.*/).then(async () => {
|
||||
await Promise.any([page.waitForURL(url => url.includes('login.aliexpress.com')).then(async () => {
|
||||
// manual login
|
||||
console.error('Not logged in! Will wait for 120s for you to login...');
|
||||
// await page.waitForTimeout(120*1000);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue