@@ -153,6 +153,18 @@ def get_uc_driver_version():
153
153
return uc_driver_version
154
154
155
155
156
+ def find_driver_version_to_use (use_version ):
157
+ # Because https://chromedriver.chromium.org/downloads stops at 114
158
+ final_chromedriver = "114"
159
+ if (
160
+ use_version
161
+ and use_version .isdigit ()
162
+ and int (use_version ) > int (final_chromedriver )
163
+ ):
164
+ use_version = final_chromedriver
165
+ return use_version
166
+
167
+
156
168
def has_cf (text ):
157
169
if (
158
170
"<title>Just a moment...</title>" in text
@@ -2832,14 +2844,15 @@ def get_local_driver(
2832
2844
elif headless :
2833
2845
if "--headless" not in chrome_options .arguments :
2834
2846
chrome_options .add_argument ("--headless" )
2835
- disable_build_check = False
2847
+ disable_build_check = True # True is NEW for Chrome 115 changes!
2836
2848
uc_driver_version = None
2837
2849
if is_using_uc (undetectable , browser_name ):
2838
2850
uc_driver_version = get_uc_driver_version ()
2839
2851
if multi_proxy :
2840
2852
from seleniumbase import config as sb_config
2841
2853
2842
2854
sb_config .multi_proxy = True
2855
+ use_version = find_driver_version_to_use (use_version )
2843
2856
if (
2844
2857
LOCAL_CHROMEDRIVER
2845
2858
and os .path .exists (LOCAL_CHROMEDRIVER )
@@ -2994,6 +3007,7 @@ def get_local_driver(
2994
3007
)
2995
3008
with uc_lock : # Avoid multithreaded issues
2996
3009
uc_driver_version = get_uc_driver_version ()
3010
+ use_version = find_driver_version_to_use (use_version )
2997
3011
if (
2998
3012
(
2999
3013
uc_driver_version != use_version
@@ -3168,6 +3182,7 @@ def get_local_driver(
3168
3182
and int (major_chrome_version ) >= 86
3169
3183
):
3170
3184
mcv = major_chrome_version
3185
+ mcv = find_driver_version_to_use (mcv )
3171
3186
headless = True
3172
3187
headless_options = _set_chrome_options (
3173
3188
browser_name ,
0 commit comments