I need your help, I am trying to automate the download of PDF files with selenium webdriver in python, this code when executed brings me the download links and prints them in console but I need them to be downloaded and saved locally in My PC.
I use ubuntu 18.04 as a development environment in python 3x. Thank you
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait as W
from selenium.webdriver.support import expected_conditions as E
URL = "https://www.diariooficial.interior.gob.cl/edicionelectronica/marcas_patentes.php?date=19-06-2020&edition=42685"
wait_time_out = 15
driver = webdriver.Chrome('./chromedriver')
driver.get(URL)
wait_variable = W(driver, wait_time_out)
links = wait_variable.until(E.visibility_of_all_elements_located((By.TAG_NAME, "a")))
print("Numero de links", len(links))
for link in links:
print(link.text)