browser parameter adjustment

This commit is contained in:
被遗忘的记忆
2024-11-05 20:23:41 +08:00
committed by GitHub
parent 66a2a1bb3d
commit 5febc03145
+7
View File
@@ -130,6 +130,12 @@ class YouProvider {
customConfig: {
userDataDir: path.join(__dirname, "browser_profiles", currentUsername),
executablePath: browserPath,
args: [
'--remote-debugging-address=127.0.0.1',
'--disable-ipv6',
'--no-sandbox',
'--disable-setuid-sandbox',
],
},
});
@@ -255,6 +261,7 @@ class YouProvider {
} catch (e) {
console.error(`初始化浏览器失败 (${currentUsername})`);
console.error(e);
await browser?.close();
}
}