I am trying to open a website with selenium, currently trying with youtube. However when I run my program it takes ages for it load the website. I ran the same code on my windows pc but there I had no problems.
I have a good and stable internet connection. Still I receive a warning which follows as:
NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
however I am not certain if this is what's causing it to be so slow.
Any ideas what's causing it to be so slow?
I tried fixing the ssl warning with doing things written on reddit, but to no avail.
This is my current code:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_experimental_option("detach", True)
driver = webdriver.Chrome(options=options)
driver.get("https://www.youtube.com")
This error message...
...implies that the macos system is using urllib3 v2.0 where as the system Python's
sslmodule is compiled withLibreSSL 2.8.3.But
LibreSSLsupport in urllib3 v2.0 have been removed which makes it impossible to be used with the system Python on in MAC OSX.However the PR Allow alternative SSL libaries with a warning addresses the issue and shouldn't impact the performance anymore.
Solution
Install the latest version of urllib3
tl; dr
urllib3>=2.0 does not work with system Python on macOS