Skip to content

Commit

Permalink
Fixed driver missing issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfswolke committed Jul 29, 2023
1 parent b3c8f9d commit a259c2c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/logic/captcha.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# ------------------------------------------------------- #
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.support.ui import WebDriverWait
from threading import Thread

Expand Down Expand Up @@ -37,10 +36,9 @@ def open_captcha_window(full_url):
options.add_experimental_option('excludeSwitches', ['enable-logging'])
if os.path.exists(path_to_ublock):
options.add_argument('load-extension=' + path_to_ublock)
# if you encounter this error ___selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary____
# set the next line to the specific Google Chrome binary on your system
# options.binary_location = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)

service = Service()
driver = webdriver.Chrome(service=service, options=options)
driver.get(full_url)

wait = WebDriverWait(driver, 100, 0.3)
Expand Down

0 comments on commit a259c2c

Please sign in to comment.