Jupyter - Python 3 - 使用 "webdriver.Chrome()" 时出现 InvalidArgumentException

Jupyter - Python 3 - InvalidArgumentException while using "webdriver.Chrome()"

我正在尝试使用 webdriver.Chrome() 打开 chrome 浏览器,

成功但无法访问 url 变量。

Chrome 弹出窗口但无法访问 url

我将此 Chrome 驱动程序版本 92 用于 windows:

https://chromedriver.storage.googleapis.com/index.html?path=92.0.4515.43/

pip install selenium    
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
print('-Finish importing package')
driver = webdriver.Chrome()
url = "youtube.com"
driver.get(url)

尝试用 URL 给 https/http 协议,所以它应该像下面这样。

url = "https://youtube.com"

代码

pip install selenium    
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
print('-Finish importing package')
driver = webdriver.Chrome()
url = "https://youtube.com"
driver.get(url)

#Reference