TypeError: WebDriver.__init__() got an unexpected keyword argument ‘executable_path’ in Selenium Python

This is due to changes in selenium 4.10.0: https://github.com/SeleniumHQ/selenium/commit/9f5801c82fb3be3d5850707c46c3f8176e3ccd8e Note that executable_path was removed. If you want to pass in an executable_path, you’ll have to use the service arg now. from selenium import webdriver from selenium.webdriver.chrome.service import Service service = Service(executable_path=”./chromedriver.exe”) options = webdriver.ChromeOptions() driver = webdriver.Chrome(service=service, options=options) # … driver.quit()

How can I get the base of a URL in Python?

The best way to do this is use urllib.parse. From the docs: The module has been designed to match the Internet RFC on Relative Uniform Resource Locators. It supports the following URL schemes: file, ftp, gopher, hdl, http, https, imap, mailto, mms, news, nntp, prospero, rsync, rtsp, rtspu, sftp, shttp, sip, sips, snews, svn, svn+ssh, … Read more