L
L
leirons2021-04-28 14:30:20
Python
leirons, 2021-04-28 14:30:20

Can't download pdf of selenium site, how?

options = webdriver.ChromeOptions()
        options.add_experimental_option('prefs', {
            "download.default_directory": "/home/mirex/PycharmProjects/parser",  
            "download.prompt_for_download": False,  
            "download.directory_upgrade": True,
            "plugins.always_open_pdf_externally": True  # 
        })
        self.driver = webdriver.Chrome(options=options)
        self.driver.get(self.url)
        sleep(3)
        self.driver.quit()


What is the problem? I was told that chrome has a default command for generating pdf. --print-to-pdf=z:/home/
but I don't really understand..

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question