You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

9 lines
480 B

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();
})();