Skip to content

Commit f2202da

Browse files
committed
Allow proxy auth with user but no password
1 parent b878608 commit f2202da

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3137,7 +3137,9 @@ def get_driver(
31373137
proxy_string, proxy_scheme = proxy_helper.validate_proxy_string(
31383138
proxy_string, keep_scheme=True
31393139
)
3140-
if proxy_string and proxy_user and proxy_pass:
3140+
if proxy_user and not proxy_pass:
3141+
proxy_pass = ""
3142+
if proxy_string and proxy_user:
31413143
proxy_auth = True
31423144
elif proxy_pac_url:
31433145
username_and_password = None
@@ -3164,7 +3166,9 @@ def get_driver(
31643166
)
31653167
if not proxy_pac_url.lower().endswith(".pac"):
31663168
raise Exception('The proxy PAC URL must end with ".pac"!')
3167-
if proxy_pac_url and proxy_user and proxy_pass:
3169+
if proxy_user and not proxy_pass:
3170+
proxy_pass = ""
3171+
if proxy_pac_url and proxy_user:
31683172
proxy_auth = True
31693173
if (
31703174
is_using_uc(undetectable, browser_name)

0 commit comments

Comments
 (0)