Merge remote-tracking branch 'origin/main'

# Conflicts:
#	.gitignore
#	README.md
#	auto-scrape.mjs
#	fetch-feishu-wiki.mjs
This commit is contained in:
beyondx123
2026-09-13 15:02:03 +08:00
2 changed files with 19 additions and 9 deletions
+4 -1
View File
@@ -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) {