We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d0cd5a commit 9b80eb0Copy full SHA for 9b80eb0
src/utils.ts
@@ -71,6 +71,15 @@ export async function generatePDF({
71
72
const page = await browser.newPage();
73
74
+ // Block PDFs as puppeteer can not access them
75
+ await page.setRequestInterception(true);
76
+ page.on('request', (request) => {
77
+ if (request.url().endsWith('.pdf')) {
78
+ console.log(chalk.yellowBright(`ignore pdf: ${request.url()}`));
79
+ request.abort();
80
+ } else request.continue();
81
+ });
82
+
83
for (const url of initialDocURLs) {
84
let nextPageURL = url;
85
0 commit comments