(节点:10652)UnhandledPromiseRejectionWarning:TimeoutError:尝试连接到浏览器时在30000 ms之后超时!保证只有最新版本的Chrome才能正常工作。
async function scrape_site(url) {
const browser = await puppeteer.launch({
product: 'firefox',
headless: false,
executablePath:"C:\\Program Files (x86)\\Mozilla Firefox2\\firefox.exe",
//args:['-wait-for-browser']
});
const page = await browser.newPage();
// Configure the navigation timeout
await page.setDefaultNavigationTimeout(0);
await page.goto(url);
}
scrape_site("https://stackoverflow.com/");
//asks to put `PUPPETEER_PRODUCT = firefox npm i puppeteer`
//although I don't understand where it is and what it is asks to put PUPPETEER_PRODUCT = firefox npm i puppeteer