|
|
|
@ -36,7 +36,17 @@ try{
|
|
|
|
|
|
|
|
|
|
if (!title) title = await (await page.waitForSelector('h1')).evaluate(el => el.textContent);
|
|
|
|
|
if (!subtitle) subtitle = await (await page.waitForSelector('h2')).evaluate(el => el.textContent);
|
|
|
|
|
console.log(title,subtitle)
|
|
|
|
|
console.log(title,subtitle);
|
|
|
|
|
|
|
|
|
|
await page.emulateMediaType('screen');
|
|
|
|
|
await page.addStyleTag({content: `
|
|
|
|
|
.hidden-print {
|
|
|
|
|
display: none !important;
|
|
|
|
|
}
|
|
|
|
|
*:not(code, .code > *){
|
|
|
|
|
color: #000 !important;
|
|
|
|
|
}
|
|
|
|
|
`});
|
|
|
|
|
|
|
|
|
|
const pages = await page.pdf({
|
|
|
|
|
//path: `${path}/${date}_${title}_pages.pdf`,
|
|
|
|
|