Apify and Crawlee Official Forum

Updated 3 months ago

Downloading File and saving to KV Store - Selenium Python

Hello,
I am trying to download a file (Excel) from a website and want to save it to the KV Store. The problem is that on clicking the download button, I cannot see where the file was downloaded.

How can I achieve this?

Thank you!
L
j
5 comments
Hi , depending if you use playwright or puppeteer I would recommend you to checkout these two articles explaining what you might be trying to achieve

https://playwright.dev/docs/downloads

https://docs.apify.com/academy/puppeteer-playwright/common-use-cases/downloading-files
Thanks but I am using Selenium currently.
Hello ,
I already had that piece of code with prefs and download.default_directory but that still does not save the file to the directory I mentioned.

Also, I checked the path via os.listdir() but it does not list the downloaded file. Can you please help me with this?
Could it be because of the Docker volume?
Add a reply
Sign up and join the conversation on Discord