I want to crawl some file using puppeteer, and I find the downloading practice like below:
puppeteer - how to set download location
await page._client.send('Page.setDownloadBehavior', {
behavior: 'allow',
downloadPath: dirname,
});
but I want to change the filename now, some examples use "fs" module to rename it when download finished, but usually, there are many files and different names, it couldn't check it in PC file system manually, we want to click the download button and rename it at right, how can I reach it?