@@ -350,7 +350,8 @@ async def get(
350350 if _cdp_geolocation :
351351 await connection .send (cdp .page .navigate ("about:blank" ))
352352 await connection .set_geolocation (_cdp_geolocation )
353- # Use the tab to navigate to new url
353+ # This part isn't needed now, but may be needed later
354+ """
354355 if (
355356 hasattr(sb_config, "_cdp_proxy")
356357 and "@" in sb_config._cdp_proxy
@@ -360,17 +361,14 @@ async def get(
360361 username_and_password = sb_config._cdp_proxy.split("@")[0]
361362 proxy_user = username_and_password.split(":")[0]
362363 proxy_pass = username_and_password.split(":")[1]
363- await connection .set_auth (
364- proxy_user , proxy_pass , self .tabs [0 ]
365- )
364+ await connection.set_auth(proxy_user, proxy_pass, self.tabs[0])
366365 time.sleep(0.25)
367- elif "auth" in kwargs and kwargs ["auth" ] and ":" in kwargs ["auth" ]:
366+ """
367+ if "auth" in kwargs and kwargs ["auth" ] and ":" in kwargs ["auth" ]:
368368 username_and_password = kwargs ["auth" ]
369369 proxy_user = username_and_password .split (":" )[0 ]
370370 proxy_pass = username_and_password .split (":" )[1 ]
371- await connection .set_auth (
372- proxy_user , proxy_pass , self .tabs [0 ]
373- )
371+ await connection .set_auth (proxy_user , proxy_pass , self .tabs [0 ])
374372 time .sleep (0.25 )
375373 frame_id , loader_id , * _ = await connection .send (
376374 cdp .page .navigate (url )
0 commit comments