File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
seleniumbase/console_scripts Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -324,18 +324,29 @@ def main(override=None):
324
324
use_version = url_request .text .split ("\r " )[0 ].split ("\n " )[0 ]
325
325
else :
326
326
use_version = DEFAULT_EDGEDRIVER_VERSION
327
+ suffix = None
327
328
if "win64" in sys_plat or "x64" in sys_plat :
328
329
file_name = "edgedriver_win64.zip"
330
+ suffix = "WINDOWS"
329
331
elif "win32" in sys_plat or "x86" in sys_plat :
330
332
file_name = "edgedriver_win32.zip"
333
+ suffix = "WINDOWS"
331
334
elif "darwin" in sys_plat :
332
335
file_name = "edgedriver_mac64.zip"
336
+ suffix = "MACOS"
333
337
elif "linux" in sys_plat :
334
338
file_name = "edgedriver_linux64.zip"
339
+ suffix = "LINUX"
335
340
else :
336
341
raise Exception (
337
342
"Cannot determine which version of EdgeDriver to download!"
338
343
)
344
+ if use_version .isdigit ():
345
+ edgedriver_st = "https://msedgedriver.azureedge.net/LATEST_RELEASE"
346
+ use_version = "%s_%s_%s" % (edgedriver_st , use_version , suffix )
347
+ url_request = requests .get (use_version )
348
+ if url_request .ok :
349
+ use_version = url_request .text .split ("\r " )[0 ].split ("\n " )[0 ]
339
350
download_url = "https://msedgedriver.azureedge.net/%s/%s" % (
340
351
use_version ,
341
352
file_name ,
You can’t perform that action at this time.
0 commit comments