columbusposa.blogg.se

Puppeteer type download
Puppeteer type download











Essentially, Puppeteer creates a custom profile each time it runs, we can override that profile and define the download directory. This will set the default download directory for files before the process starts. _directory = path.resolve(_dirname, './downloads') įs.writeFileSync(customChrome+'/Default/Preferences', JSON.stringify(obj)) Īrgs: _directory = path.resolve(_dirname, './downloads') Let prefs = fs.readFileSync(customChrome+'/Default/Preferences') I was able to set the download location using the following code, let customChrome = path.resolve(_dirname, './customChrome')

puppeteer type download puppeteer type download puppeteer type download

I realize this is an old thread, but this thread popped up first for me when looking for how to set Puppeteer default download location.













Puppeteer type download