I'm learning NestJs and puppeteer.
I tried web crawl and it worked well.
But because of launching and closing headless browser, it takes a lot of response time.
I think it's better launching browser just one time than every launching and closing.
But i don't know how i use constructor in NestJS. It looks different from Vanila javascript.
async crawlData() {
const browser = await launch();
const page = await browser.newPage();
await page.goto("https://ko.reactjs.org/");
await page.screenshot({ path: "./Docs/ko-reactjs-homepage.png" });
await browser.close();
}
Please understand that i'm not native english speaker.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…