Skip to content

Commit

Permalink
Update driver.py
Browse files Browse the repository at this point in the history
  • Loading branch information
uNickz committed Dec 21, 2023
1 parent f310faf commit a1eadbd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion WebSite2PDF/driver/driver.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import requests
import selenium
import logging
import json
import os
Expand Down Expand Up @@ -26,7 +27,10 @@ def start_client(self, options: Optional[Options] = None, service: Optional[Serv
raise ClientAlreadyStarted

if install_driver:
self.driver = webdriver.Chrome(executable_path = ChromeDriverManager().install(), options = options, service = service)
if tuple(map(int, selenium.__version__.split("."))) >= (4, 10, 0):
self.driver = webdriver.Chrome(options = options, service = Service(executable_path = ChromeDriverManager().install()))
else:
self.driver = webdriver.Chrome(executable_path = ChromeDriverManager().install(), options = options, service = service)
else:
self.driver = webdriver.Chrome(options = options, service = service)

Expand Down

0 comments on commit a1eadbd

Please sign in to comment.