大家好,所以我正在使用一个nodejs程序包(capture-website),该程序包可以使定义的URL列表成为屏幕快照。我现在的问题是我想知道如何将这些捕获的结果保存在同一文件中,或者pdf。谢谢您的帮助
const captureWebsite = require('capture-website');
const options = {
width: 1920,
height: 3000
};
const items = [
['https://nodejs.org/en/', 'ca2'],
['https://openclassrooms.com/fr/courses/1056721-des-applications-ultra-rapides-avec-node-js/1056866-node-js-mais-a-quoi-ca-sert', 'cap3'],
['https://www.w3schools.com/nodejs/nodejs_intro.asp', 'cap4'],
['http://phantomjs.org/screen-capture.html', 'cap5'],
['https://www.hespress.com/societe/430802.htmlhttps://nodejs.dev/',
'cap6'],
['https://nodejs.dev/', 'cap7'],
['https://nodejs.dev/', 'ca1'],
];
(async () => {
await Promise.all(items.map(([url, filename]) => {
return captureWebsite.file(url, `${filename}.png`, options);
}));
})();