This commit is contained in:
TheNetsky
2023-11-04 16:21:56 +01:00
parent 66dcdd4a7a
commit 3b15fe19a7
8 changed files with 26 additions and 19 deletions

View File

@@ -30,6 +30,9 @@ class Browser {
'--no-sandbox',
'--mute-audio',
'--disable-setuid-sandbox',
'--ignore-certificate-errors',
'--ignore-certificate-errors-spki-list',
'--ignore-ssl-errors',
proxy.url ? `--proxy-server=${proxy.url}:${proxy.port}` : ''
]
})

View File

@@ -30,7 +30,7 @@ export default class BrowserFunc {
await this.bot.browser.utils.tryDismissCookieBanner(page)
// Check if account is suspended
const isSuspended = await page.waitForSelector('#suspendedAccountHeader', { visible: true, timeout: 3000 }).then(() => true).catch(() => false)
const isSuspended = await page.waitForSelector('#suspendedAccountHeader', { visible: true, timeout: 2000 }).then(() => true).catch(() => false)
if (isSuspended) {
this.bot.log('GO-HOME', 'This account is suspended!', 'error')
throw new Error('Account has been suspended!')