The title says it all. I am using selenium with python and safari as a browser since Chromedriver is crashing. I need the safari browser to be undetectable and want to be able to set a proxy and disable the navigator flag and other things that make it detectable that I am using a bot. Thanks for your help! Below in the code are just examples of what I need as options not the code I think is correct for Safari would be nice if you would tell me!
from selenium import webdriver
driver = webdriver.Safari()
#PROXY_HOST = "12.12.12.123"
#PROXY_PORT = "1234"
#profile.set_preference("network.proxy.type", 1)
#profile.set_preference("network.proxy.http", PROXY_HOST)
#profile.set_preference("network.proxy.http_port", int(PROXY_PORT))
import nest_asyncio
nest_asyncio.apply()
import time
import random
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import WebDriverException
from selenium.common.exceptions import NoSuchWindowException
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
options.page_load_strategy = 'eager'
options.add_argument("--window-size=1920,1080")
#options.add_argument('--proxy-server=176.9.75.42:1080')
options.add_argument('--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36')
# another way to set profile is the below (which takes precedence if both variants are used
options.add_argument('--user-data-dir=c:\\temp\\profile6')
# just some options passing in to skip annoying popups
options.add_argument('--no-first-run --no-service-autorun --password-store=basic')