danburzo/percollate

Problems regarding exif feature, when multiple websites are provided

yashha opened this issue · 1 comments

Environment

  • Operating System:
  • node --version: v14.11.0
  • npm --version: 6.14.8
  • yarn --version, if using Yarn:
  • percollate --version: 1.2.0

Description

When you input multiple websites it seems to throw an error:

node:50112) UnhandledPromiseRejectionWarning: TypeError: `author` must be of type `string`, but was actually of type `undefined`
    at Object.exports.assertIs (/home/yasar/Workspace/js/percollate/node_modules/pdf-lib/cjs/utils/validators.js:140:11)
    at PDFDocument.setAuthor (/home/yasar/Workspace/js/percollate/node_modules/pdf-lib/cjs/api/PDFDocument.js:356:17)
    at addExif (/home/yasar/Workspace/js/percollate/src/exif.js:13:9)

Example:
percollate pdf https://www.g-f-v.org/node/1326 https://www.br.de/nachrichten/bayern/wuerzburger-schueler-starten-eine-petition-gegen-das-abi-2021,SNJNc4v
percollate pdf https://www.br.de/nachrichten/bayern/wuerzburger-schueler-starten-eine-petition-gegen-das-abi-2021,SNJNc4v https://www.br.de/nachrichten/bayern/wuerzburger-schueler-starten-eine-petition-gegen-das-abi-2021,SNJNc4v
percollate pdf https://www.g-f-v.org/node/1326 https://www.g-f-v.org/node/1326

Thanks for the report! That was indeed the case with multiple URLs.