0

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")
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Adam
  • 1
  • 1
  • Hard to tell, your code works fine on my MacBook (M1). Takes maybe 2 seconds to open. You can try reinstall selenium or try `pip install -U selenium` to update it – P_n Jul 13 '23 at 20:21

1 Answers1

0

This error message...

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

...implies that the system is using v2.0 where as the system Python's ssl module is compiled with LibreSSL 2.8.3.

But LibreSSL support 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

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352