python selenium chrome ssl Your connection is not private and browser level authentication login
import os
from selenium import webdriver
chromedriver = "C:\Python\chromedriver"
os.environ["webdriver.chrome.driver"] = chromedriver
#if browser == 'chrome':
options = webdriver.ChromeOptions()
#options.add_argument("--start-maximized")
#Your connection is not private through not certificated ssl
options.add_argument('--ignore-certificate-errors')
prefs = {
"profile.default_content_settings.popups": 0,
"download.default_directory": r"C:\Users\user_dir\Desktop\\", # IMPORTANT - ENDING SLASH V IMPORTANT
"directory_upgrade": True,
"download.prompt_for_download": False
}
options.add_experimental_option("prefs", prefs)
driver = webdriver.Chrome(executable_path=chromedriver, chrome_options=options)
#browser level authentication
username = "USER"
password = "PASSWORD"
driver.get('https://' + username + ':' + password + '@HOMEPAGE:COM/WEBSITE/')
#driver.quit()
#https://stackoverflow.com/questions/23530399/chrome-web-driver-download-files
from selenium import webdriver
chromedriver = "C:\Python\chromedriver"
os.environ["webdriver.chrome.driver"] = chromedriver
#if browser == 'chrome':
options = webdriver.ChromeOptions()
#options.add_argument("--start-maximized")
#Your connection is not private through not certificated ssl
options.add_argument('--ignore-certificate-errors')
prefs = {
"profile.default_content_settings.popups": 0,
"download.default_directory": r"C:\Users\user_dir\Desktop\\", # IMPORTANT - ENDING SLASH V IMPORTANT
"directory_upgrade": True,
"download.prompt_for_download": False
}
options.add_experimental_option("prefs", prefs)
driver = webdriver.Chrome(executable_path=chromedriver, chrome_options=options)
#browser level authentication
username = "USER"
password = "PASSWORD"
driver.get('https://' + username + ':' + password + '@HOMEPAGE:COM/WEBSITE/')
#driver.quit()
#https://stackoverflow.com/questions/23530399/chrome-web-driver-download-files
Kommentarer
Send en kommentar