@@ -2171,9 +2171,6 @@ def get_local_driver(
2171
2171
major_edge_version = None
2172
2172
if major_edge_version :
2173
2173
use_version = major_edge_version
2174
- use_version = find_edgedriver_version_to_use (
2175
- use_version , driver_version
2176
- )
2177
2174
edge_driver_version = None
2178
2175
edgedriver_upgrade_needed = False
2179
2176
if os .path .exists (LOCAL_EDGEDRIVER ):
@@ -2200,8 +2197,13 @@ def get_local_driver(
2200
2197
output = 0
2201
2198
if int (output ) >= 2 :
2202
2199
edge_driver_version = output
2200
+ if driver_version == "keep" :
2201
+ driver_version = edge_driver_version
2203
2202
except Exception :
2204
2203
pass
2204
+ use_version = find_edgedriver_version_to_use (
2205
+ use_version , driver_version
2206
+ )
2205
2207
local_edgedriver_exists = False
2206
2208
if LOCAL_EDGEDRIVER and os .path .exists (LOCAL_EDGEDRIVER ):
2207
2209
local_edgedriver_exists = True
@@ -2674,6 +2676,8 @@ def get_local_driver(
2674
2676
output = full_ch_driver_version .split ("." )[0 ]
2675
2677
if int (output ) >= 2 :
2676
2678
ch_driver_version = output
2679
+ if driver_version == "keep" :
2680
+ driver_version = ch_driver_version
2677
2681
except Exception :
2678
2682
pass
2679
2683
elif path_chromedriver :
@@ -2696,8 +2700,21 @@ def get_local_driver(
2696
2700
output = full_ch_driver_version .split ("." )[0 ]
2697
2701
if int (output ) >= 2 :
2698
2702
ch_driver_version = output
2703
+ if driver_version == "keep" :
2704
+ use_version = ch_driver_version
2699
2705
except Exception :
2700
2706
pass
2707
+ disable_build_check = True
2708
+ uc_driver_version = None
2709
+ if is_using_uc (undetectable , browser_name ):
2710
+ uc_driver_version = get_uc_driver_version ()
2711
+ if multi_proxy :
2712
+ sb_config .multi_proxy = True
2713
+ if uc_driver_version and driver_version == "keep" :
2714
+ driver_version = uc_driver_version
2715
+ use_version = find_chromedriver_version_to_use (
2716
+ use_version , driver_version
2717
+ )
2701
2718
if headless2 :
2702
2719
try :
2703
2720
if use_version == "latest" or int (use_version ) >= 109 :
@@ -2722,15 +2739,6 @@ def get_local_driver(
2722
2739
elif headless :
2723
2740
if "--headless" not in chrome_options .arguments :
2724
2741
chrome_options .add_argument ("--headless" )
2725
- disable_build_check = True # True is NEW for Chrome 115 changes!
2726
- uc_driver_version = None
2727
- if is_using_uc (undetectable , browser_name ):
2728
- uc_driver_version = get_uc_driver_version ()
2729
- if multi_proxy :
2730
- sb_config .multi_proxy = True
2731
- use_version = find_chromedriver_version_to_use (
2732
- use_version , driver_version
2733
- )
2734
2742
if LOCAL_CHROMEDRIVER and os .path .exists (LOCAL_CHROMEDRIVER ):
2735
2743
try :
2736
2744
make_driver_executable_if_not (LOCAL_CHROMEDRIVER )
0 commit comments