#!/usr/bin/env python3 import os.path import os from selenium import webdriver options = webdriver.ChromeOptions() if location := os.getenv("CHROME"): options.binary_location = location options.add_argument("--start-maximized") options.add_argument( "--user-data-dir=" + os.path.expanduser("~/.cache/chromium-emoji-script") ) options.add_experimental_option("detach", True) driver = webdriver.Chrome(options=options) # Selenium says this API is deprecated but there's no better working option in Python # (okay, maybe there is but they don't really have docs)