(async () => {
const browser = await puppeteer.launch()
const page = await browser.newPage();
await page.goto('https://github.com/Mehver');
})();
改为
(async () => {
const browser = await puppeteer.launch()
const pages = await browser.pages();
const page = pages[0];
await page.goto('https://github.com/Mehver');
})();
改进后的网页导航:使用Puppeteer获取GitHub个人主页

本文展示了如何使用Puppeteer库优雅地从多页中选择并跳转到GitHub用户'SynthesisDu'的个人主页,以简化浏览器操作流程。
2632





