const { chromium } = require('playwright'); (async () => { const browser = await chromium.launch({ headless: true, args: ['--no-sandbox'] }); const page = await browser.newPage({ viewport: { width: 1920, height: 1080 } }); await page.goto('https://www.yunexpress.cn', { waitUntil: 'load', timeout: 15000 }); await page.screenshot({ path: 'yunexpress_home.png', fullPage: false }); console.log('✅ 截图已保存为 yunexpress_home.png'); await browser.close(); })();