mirror of
https://github.com/NohamR/pdfy.git
synced 2026-11-25 23:07:52 +00:00
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22485ccf71 | ||
|
|
640b5d830c | ||
|
|
eaff0ca975 | ||
|
|
6d4d814ff0 | ||
|
|
f4ff731d0b | ||
|
|
346544116d |
No files matched your search
Generated
+30
-30
@@ -8,10 +8,10 @@
|
|||||||
"name": "pdfy",
|
"name": "pdfy",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"commander": "^15.0.0",
|
"commander": "^15.1.0",
|
||||||
"pino": "^10.4.0",
|
"pino": "^10.4.0",
|
||||||
"pino-pretty": "^13.2.0",
|
"pino-pretty": "^13.2.0",
|
||||||
"puppeteer": "^25.13.0"
|
"puppeteer": "^25.16.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@pinojs/redact": {
|
"node_modules/@pinojs/redact": {
|
||||||
@@ -21,12 +21,12 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@puppeteer/browsers": {
|
"node_modules/@puppeteer/browsers": {
|
||||||
"version": "3.2.4",
|
"version": "3.2.6",
|
||||||
"resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-3.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-3.2.6.tgz",
|
||||||
"integrity": "sha512-okJ6yQMc0SBexOKxMi966omwAV1uAPwgF/YMZdb04gZQPXVjWHl9bmXjZYtIcsN1+PN3Bz4iFfGK3g+c6lZJ0Q==",
|
"integrity": "sha512-MJP29gVoHznmqmwhH1tlZqzfeQ3aylTpSSa6WKZXtkwYUH02i9imBmWGTyZrbnAou5paX78SE4jMAUqnEPf8ug==",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"modern-tar": "^0.8.5",
|
"modern-tar": "^0.8.6",
|
||||||
"yargs": "^18.0.0"
|
"yargs": "^18.0.0"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -135,9 +135,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/commander": {
|
"node_modules/commander": {
|
||||||
"version": "15.0.0",
|
"version": "15.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/commander/-/commander-15.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/commander/-/commander-15.1.0.tgz",
|
||||||
"integrity": "sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==",
|
"integrity": "sha512-cgnQ88TRrWcC7pVq46RzJVRMktu3W2RcbnoidnfBsl1bmDCBwJS/udcIZpKoCrbAYYaCqsz1yZCVIgbIaU3ddQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=22.12.0"
|
"node": ">=22.12.0"
|
||||||
@@ -153,9 +153,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/devtools-protocol": {
|
"node_modules/devtools-protocol": {
|
||||||
"version": "0.0.1696802",
|
"version": "0.0.1704951",
|
||||||
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1696802.tgz",
|
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1704951.tgz",
|
||||||
"integrity": "sha512-FO5/SENfvc2K8wRnWQflKcwuoTH4dBkXCWTQ9ebIWtuX8JM5+ZvCotaEmkfh21pO7TvIKGTM3hG4xFiq9WTwmg==",
|
"integrity": "sha512-GQhQOs9u/Mvm1zMtJIH872JS4AskuZdUSsPNPk4ChahtWAUqgz6atEtIsMt+nO7MqF1Ic4HxII/k8Cu36JivNg==",
|
||||||
"license": "BSD-3-Clause"
|
"license": "BSD-3-Clause"
|
||||||
},
|
},
|
||||||
"node_modules/emoji-regex": {
|
"node_modules/emoji-regex": {
|
||||||
@@ -258,9 +258,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/modern-tar": {
|
"node_modules/modern-tar": {
|
||||||
"version": "0.8.5",
|
"version": "0.8.6",
|
||||||
"resolved": "https://registry.npmjs.org/modern-tar/-/modern-tar-0.8.5.tgz",
|
"resolved": "https://registry.npmjs.org/modern-tar/-/modern-tar-0.8.6.tgz",
|
||||||
"integrity": "sha512-snEhs+6G5Tjd4I7tLCDOaoln2RgE0bD19RzEKgvgK2hZ5VKy3MpLhLTZ2fWpXSTg4K2cyPwp+VHATFJhxfnOeA==",
|
"integrity": "sha512-LYSks0tNVqbtez/9OB0YFP6qLRSqkdAxJWOQpVaR67lNTbj2zNLyYpowkRMia5lXLCZKzxwoxkxH2MbbBR2aEg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0"
|
"node": ">=18.0.0"
|
||||||
@@ -381,17 +381,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/puppeteer": {
|
"node_modules/puppeteer": {
|
||||||
"version": "25.13.0",
|
"version": "25.16.0",
|
||||||
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-25.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-25.16.0.tgz",
|
||||||
"integrity": "sha512-vB4KLXTT5QqlikcOQ/xV0RY18bBVtNyLUTfqJ9mW+penHyoM+5DmANYuDCI4jgBtiL0eD9I5ZFSafW6/a6Trpg==",
|
"integrity": "sha512-LOr3reYnxAYYfQkpopz1fQnL0LdvqhpR5U2Fu+QnwzTX2gpVTHsn91UETo5NNC1md2/oC54Zu1ChBXgZDNSP1A==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@puppeteer/browsers": "3.2.4",
|
"@puppeteer/browsers": "3.2.6",
|
||||||
"chromium-bidi": "157.0.8090-0",
|
"chromium-bidi": "157.0.8090-0",
|
||||||
"devtools-protocol": "0.0.1696802",
|
"devtools-protocol": "0.0.1704951",
|
||||||
"lilconfig": "^3.1.3",
|
"lilconfig": "^3.1.3",
|
||||||
"puppeteer-core": "25.13.0",
|
"puppeteer-core": "25.16.0",
|
||||||
"typed-query-selector": "^2.12.3"
|
"typed-query-selector": "^2.12.3"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -402,17 +402,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/puppeteer-core": {
|
"node_modules/puppeteer-core": {
|
||||||
"version": "25.13.0",
|
"version": "25.16.0",
|
||||||
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-25.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-25.16.0.tgz",
|
||||||
"integrity": "sha512-cyBS0OEx3e9NS53B5F6+UazXtR7f9Tw0cR1/FbPW59/hV6JPZbkIiMnxK2543IkFp3rsGlLn1iPDLF77TJsJsA==",
|
"integrity": "sha512-VA5Pf54N8shfopNkZZXCdiiwfnnY8ZJYAMqFQRhlH5mGUhfwf53Ar770GPtdpTDLUqvQeYpIBtC9/G2Jij2IJw==",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@puppeteer/browsers": "3.2.4",
|
"@puppeteer/browsers": "3.2.6",
|
||||||
"chromium-bidi": "157.0.8090-0",
|
"chromium-bidi": "157.0.8090-0",
|
||||||
"devtools-protocol": "0.0.1696802",
|
"devtools-protocol": "0.0.1704951",
|
||||||
"typed-query-selector": "^2.12.3",
|
"typed-query-selector": "^2.12.3",
|
||||||
"webdriver-bidi-protocol": "1.0.1",
|
"webdriver-bidi-protocol": "1.0.1",
|
||||||
"ws": "^8.21.3"
|
"ws": "^8.22.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=22.12.0"
|
"node": ">=22.12.0"
|
||||||
@@ -637,9 +637,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/zod": {
|
"node_modules/zod": {
|
||||||
"version": "4.6.5",
|
"version": "4.6.7",
|
||||||
"resolved": "https://registry.npmjs.org/zod/-/zod-4.6.5.tgz",
|
"resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz",
|
||||||
"integrity": "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q==",
|
"integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/colinhacks"
|
"url": "https://github.com/sponsors/colinhacks"
|
||||||
|
|||||||
+2
-2
@@ -25,9 +25,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"commander": "^15.0.0",
|
"commander": "^15.1.0",
|
||||||
"pino": "^10.4.0",
|
"pino": "^10.4.0",
|
||||||
"pino-pretty": "^13.2.0",
|
"pino-pretty": "^13.2.0",
|
||||||
"puppeteer": "^25.13.0"
|
"puppeteer": "^25.16.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -143,6 +143,15 @@ export async function extractRenderedContent (page) {
|
|||||||
doc.documentElement.setAttribute('data-mode', dataMode)
|
doc.documentElement.setAttribute('data-mode', dataMode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The article HTML is later re-rendered from an opaque origin (about:blank),
|
||||||
|
// so resources become cross-origin. Sites rarely send CORS headers for
|
||||||
|
// images, which makes images with `crossorigin="anonymous"` fail to load
|
||||||
|
// (and `integrity` checks reject them). Strip both so images render.
|
||||||
|
for (const el of doc.querySelectorAll('[crossorigin], [integrity]')) {
|
||||||
|
el.removeAttribute('crossorigin')
|
||||||
|
el.removeAttribute('integrity')
|
||||||
|
}
|
||||||
|
|
||||||
const cs = getComputedStyle(doc.documentElement)
|
const cs = getComputedStyle(doc.documentElement)
|
||||||
const cssVars = ['--fg', '--bg', '--bd', '--lk', '--hg']
|
const cssVars = ['--fg', '--bg', '--bd', '--lk', '--hg']
|
||||||
const inlineVars = cssVars
|
const inlineVars = cssVars
|
||||||
|
|||||||
Reference in new issue
Block a user