New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set download dir using puppeteer-extra-plugin-user-preferences #44
Comments
This worked for me.
|
Assuming that what @leblancmeneses provided (thanks!) works I'm gonna close this issue now. :) |
Unfortunately, it doesn't work for me and I'm becoming crazy... |
try to make a small demo script and share it here or on https://extra.community |
this worked for me, using const UserPreferencesPlugin = require("puppeteer-extra-plugin-user-preferences");
const downloadImageDirectoryPath = process.cwd()
puppeteer.use(
UserPreferencesPlugin({
userPrefs: {
download: {
prompt_for_download: false,
open_pdf_in_system_reader: true,
default_directory: downloadImageDirectoryPath,
},
plugins: {
always_open_pdf_externally: true,
},
},
})
); |
puppeteer.use(require('puppeteer-extra-plugin-user-data-dir')()) puppeteer.use(require('puppeteer-extra-plugin-user-preferences')({prefs: { download: { prompt_for_download: false, default_directory: OUTDIR, } } }))
. This wasn't successful. Any idea to set download behaviour at browser level. Btw great wrapper for puppeteer.The text was updated successfully, but these errors were encountered: