File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -251,6 +251,16 @@ def Driver(
251251 is_mobile = False
252252 test_id = "direct_driver"
253253 proxy_string = proxy
254+ if proxy_string is None and "--proxy" in arg_join :
255+ if "--proxy=" in arg_join :
256+ proxy_string = arg_join .split ("--proxy=" )[1 ].split (" " )[0 ]
257+ elif "--proxy " in arg_join :
258+ proxy_string = arg_join .split ("--proxy " )[1 ].split (" " )[0 ]
259+ if proxy_string :
260+ if proxy_string .startswith ('"' ) and proxy_string .endswith ('"' ):
261+ proxy_string = proxy_string [1 :- 1 ]
262+ elif proxy_string .startswith ("'" ) and proxy_string .endswith ("'" ):
263+ proxy_string = proxy_string [1 :- 1 ]
254264 user_agent = agent
255265 recorder_mode = False
256266 if recorder_ext :
Original file line number Diff line number Diff line change @@ -312,6 +312,16 @@ def SB(
312312 if is_mobile :
313313 sb_config .mobile_emulator = True
314314 proxy_string = proxy
315+ if proxy_string is None and "--proxy" in arg_join :
316+ if "--proxy=" in arg_join :
317+ proxy_string = arg_join .split ("--proxy=" )[1 ].split (" " )[0 ]
318+ elif "--proxy " in arg_join :
319+ proxy_string = arg_join .split ("--proxy " )[1 ].split (" " )[0 ]
320+ if proxy_string :
321+ if proxy_string .startswith ('"' ) and proxy_string .endswith ('"' ):
322+ proxy_string = proxy_string [1 :- 1 ]
323+ elif proxy_string .startswith ("'" ) and proxy_string .endswith ("'" ):
324+ proxy_string = proxy_string [1 :- 1 ]
315325 user_agent = agent
316326 recorder_mode = False
317327 if recorder_ext :
You can’t perform that action at this time.
0 commit comments