the library used is puppeteer,. As soon as you cannot access url, you will get stuck in infinite callback waiting. How to solve this problem
const puppeteer = require("puppeteer-core");
async function test() {
const browser = await puppeteer.launch({executablePath: "/opt/google/Chromium/chrome"});
const page = await browser.newPage();
await page.goto("https://www.baidu/top");
await page.screenshot({path: "example.png"});
await browser.close();
};
test().catch(error => console.log(error.message));