Merge remote-tracking branch 'origin/main'
# Conflicts: # .gitignore # README.md # auto-scrape.mjs # fetch-feishu-wiki.mjs
This commit is contained in:
+4
-1
@@ -471,7 +471,10 @@ async function saveStorageState(ctx) {
|
||||
|
||||
const savedState = loadStorageState();
|
||||
const hasSavedCookies = !!savedState;
|
||||
const browser = await chromium.launch({ headless: false, args: ['--window-size=820,720'] });
|
||||
// CHROME_PATH 环境变量可指定自定义浏览器路径(来自远程分支的特性)
|
||||
const launchOpts = { headless: false, args: ['--window-size=820,720'] };
|
||||
if (process.env.CHROME_PATH) launchOpts.executablePath = process.env.CHROME_PATH;
|
||||
const browser = await chromium.launch(launchOpts);
|
||||
const context = await browser.newContext(savedState ? { storageState: savedState } : {});
|
||||
|
||||
if (savedState) {
|
||||
|
||||
Reference in New Issue
Block a user