Upgrade puppeteer to version 8.0.0

space thumbnails background-size: cover
This commit is contained in:
dm
2021-03-24 00:03:07 +01:00
parent 6bd7130597
commit 63d70c498a
4 changed files with 87 additions and 62 deletions

View File

@@ -36,7 +36,7 @@ module.exports = {
page.setDefaultTimeout(timeout);
await page.setJavaScriptEnabled(false);
await page.goto(space_url, {waitUntil: 'networkidle2'});
await page.emulateMedia('screen');
await page.emulateMediaType('screen');
if (type=="pdf") {
await page.pdf({path: export_path, printBackground: true, width: space.width+'px', height: space.height+'px' });