browser parameter adjustment
This commit is contained in:
@@ -130,6 +130,12 @@ class YouProvider {
|
|||||||
customConfig: {
|
customConfig: {
|
||||||
userDataDir: path.join(__dirname, "browser_profiles", currentUsername),
|
userDataDir: path.join(__dirname, "browser_profiles", currentUsername),
|
||||||
executablePath: browserPath,
|
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) {
|
} catch (e) {
|
||||||
console.error(`初始化浏览器失败 (${currentUsername})`);
|
console.error(`初始化浏览器失败 (${currentUsername})`);
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
await browser?.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user