Commit 7729713e authored by nanahira's avatar nanahira

Update src/puppeteer/puppeteer.service.ts

parent e52b3901
Pipeline #37414 passed with stages
in 16 minutes and 35 seconds
......@@ -35,10 +35,12 @@ export class PuppeteerService
action: (page: Page) => Promise<T>,
) {
const page = await this.browser.newPage();
try {
await page.goto(url, { waitUntil: 'networkidle0', timeout: 300000 });
const result = await action(page);
return await action(page);
} finally {
await page.close();
return result;
}
}
render(url: string) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment