options = webdriver.ChromeOptions()
options.add_argument('--kiosk')
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-gpu')
options.add_argument('--hide-scrollbars')
# options.add_argument('--single-process')
options.add_argument('--ignore-certificate-errors')
options.add_argument('--disable-dev-shm-usage')
options.add_argument('--auto-open-devtools-for-tabs')
options.add_argument('--disable-setuid-sandbox')
options.add_argument('--dns-prefetch-disable')
options.add_argument("enable-automation")
options.add_argument("--disable-browser-side-navigation")
options.add_argument('--ignore-certificate-errors-spki-list')
options.add_argument('--ignore-ssl-errors')
options.add_argument("--ignore_ssl")
options.add_argument("--disable-application-cache")
options.add_argument("--disable-crash-reporter")
options.add_argument("--disable-in-process-stack-traces")
options.add_argument("--output=/dev/null")
options.add_argument('--disable-features=IsolateOrigins,site-per-process')
options.add_argument("--lang=en_US.UTF-8")
options.add_argument("--language=en_US:en")
options.add_argument("--lc_all=en_US.UTF-8")
options.add_argument("--homedir=/tmp")
options.add_argument("--disk-cache-dir=/tmp/cache-dir")
options.add_argument("--data-path=/tmp/data-path")
options.add_argument("--user-data-dir=/tmp/user-data")
options.add_argument("--disable-software-rasterizer")
options.add_argument('--disable-logging')
options.add_argument('--log-level=3')
options.add_argument('--v=99')
options.add_argument('--no-zygote')
options.add_argument('--no-startup-window')
options.add_argument("--disable-session-crashed-bubble")
options.add_argument("--disable-ipv6")
options.add_argument("--allow-http-screen-capture")
options.add_argument('--vmodule')
# options.add_argument('--remote-debugging-port=9222')
options.add_argument("--disable-infobars")
options.add_argument("--disable-extensions")
options.add_argument('--disable-blink-features=AutomationControlled')
options.add_argument("--incognito")
options.add_argument("--disable-popup-blocking")
options.add_argument("--excludeSwitches")
options.add_argument("--disable-default-app")
# options.add_argument("--disable-web-security")
options.add_argument("--disable-site-isolation-trials")
options.add_argument("--allow-cross-origin-auth-prompt")
options.add_argument("--allow-running-insecure-content")
options.add_argument('--allow-insecure-localhost')
options.add_argument("--allow-file-access")
options.add_argument("--allow-file-access-from-files")
options.add_argument('--load-images=false')
options.add_argument('--proxy-type=http')
options.add_argument('--ssl-protocol=any')
options.add_argument("start-fullscreen")
options.add_argument("start-maximized")
prefs = {
"intl.accept_languages": "en,en_US",
"profile.managed_default_content_settings.images":2,
"profile.default_content_setting_values.notifications":2,
"profile.managed_default_content_settings.stylesheets":2,
"profile.managed_default_content_settings.cookies":2,
"profile.managed_default_content_settings.javascript":1,
"profile.managed_default_content_settings.plugins":1,
"profile.managed_default_content_settings.popups":2,
"profile.managed_default_content_settings.geolocation":2,
"profile.managed_default_content_settings.media_stream":2,
"credentials_enable_service": False,
"profile.password_manager_enabled": False,
}
options.add_experimental_option("prefs", prefs)
options.add_experimental_option("detach", True)
options.add_experimental_option('excludeSwitches', ['enable-automation'])