save screenshot in full size page
This commit is contained in:
parent
1376b14e2a
commit
fb02db9b2f
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ export class CrawlerService {
|
|||
// SCRIPTS //
|
||||
|
||||
// SCREENSHOT //
|
||||
const screenshotBuffer: Buffer = await page.screenshot();
|
||||
const screenshotBuffer: Buffer = await page.screenshot({ fullPage: true });
|
||||
fs.writeFile(`${directory}screenshot.png`, screenshotBuffer, (err) => {
|
||||
if (err) throw err;
|
||||
console.log(`Screenshot saved! ${directory}screenshot.png`);
|
||||
|
|
Loading…
Reference in a new issue