79708500

Date: 2025-07-21 02:52:16
Score: 1.5
Natty:
Report link

First of all, go to the folder where our script will be located and define a new environment:

python3 -m venv .

Next, install selenium:

./bin/pip install selenium

Install webdriver_manager:

./bin/pip install webdriver-manager

Now the most important thing: we specify the path to our manager. I don’t understand why it should be specified manually, but apparently it should (thanks to https://stackoverflow.com/a/63415104/28821514).

import sys
sys.path.append("./lib/python3.12/site-packages")

Then do everything according to the manual. You may have some other errors, but the webdriver_manager should be imported.

from selenium import webdriver
from selenium.webdriver.chrome.service import Service as BraveService
from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.core.os_manager import ChromeType
Reasons:
  • Blacklisted phrase (0.5): thanks
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Nikulok