[Python] Chrome blocks download csv with selenium

Discussão em 'Python' iniciado por Stack, Abril 18, 2025.

  1. Stack

    Stack Membro Participativo

    I have a script to download a csv file. It runs perfectly until the last step. Chrome blocks the download of the CSV_file.

    Tried all kind of options and prefs. I am running out of options.

    options = webdriver.ChromeOptions()

    prefs = {
    "download.default_directory": "D:/Lokale schijf/COMPANYNAME/datafiles/SOFTWEAR_STOCKDATA", # Verander dit naar je gewenste downloadmap
    "download.prompt_for_download": False,
    "safebrowsing.enabled": True,

    }
    options.add_experimental_option("prefs", prefs)
    options.add_argument("--disable-popup-blocking")
    options.add_argument("--safebrowsing-disable-download-protection");
    options.add_argument("--safebrowsing-disable-extension-blacklist");
    options.add_argument("--disable-features=DownloadBubble,DownloadBubbleV2");



    # Start de webdriver (gebruik Chrome of een andere driver die bij jouw browser past)
    driver = webdriver.Chrome(options=options)


    don't want to switch to other browser.

    Continue reading...

Compartilhe esta Página