Puppeteer download CSV file using javascript
Hello, I am trying to use puppeteer with javascript to scrape website and download CSV file using await page.click(CSS selector). Unfortunately, no file is ever downloaded. On local machine it works.
Screenshots are downloaded to the Apify storage, but the CSV file is not... does anybody know how to do that? Thank you
1 Reply
stormy-gold•3y ago
you can try to use something like this (if you can figure out which URL you can use to download file):
or you can intercept request after click event.
Something like this (some old example, but logic is ok):