This commit is contained in:
TheNetsky
2023-10-14 17:01:13 +02:00
parent b341f7e339
commit e315abba3f
12 changed files with 167 additions and 71 deletions

View File

@@ -18,6 +18,7 @@ class Browser {
userDataDir: await loadSesion(email),
args: [
'--no-sandbox',
'--mute-audio',
'--disable-setuid-sandbox',
`--user-agent=${userAgent.userAgent}`,
isMobile ? '--window-size=568,1024' : ''

View File

@@ -28,7 +28,7 @@ export async function goHome(page: Page): Promise<boolean> {
// Check if account is suspended
const isSuspended = await page.waitForSelector('#suspendedAccountHeader', { visible: true, timeout: 3000 }).then(() => true).catch(() => false)
if (isSuspended) {
log('GO-HOME', 'This account is suspended!')
log('GO-HOME', 'This account is suspended!', 'error')
throw new Error('Account has been suspended!')
}