Skip to content

Commit 3a3485a

Browse files
committed
fix: update process creation to capture output and clean proxy format
1 parent c6474a0 commit 3a3485a

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

pydoll/browser/managers/browser_process_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def start_browser_process(
5555
@staticmethod
5656
def _default_process_creator(command: list[str]) -> subprocess.Popen:
5757
"""Create browser process with output capture to prevent console clutter."""
58-
return subprocess.Popen(command, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
58+
return subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
5959

6060
def stop_process(self):
6161
"""

pydoll/browser/managers/proxy_manager.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,20 @@ def _parse_proxy(proxy_value: str) -> tuple[bool, Optional[str], Optional[str],
7474
return False, None, None, proxy_value
7575

7676
try:
77-
creds_part, server_part = proxy_value.split('@', 1)
77+
# Split scheme if present
78+
if '://' in proxy_value:
79+
scheme, rest = proxy_value.split('://', 1)
80+
has_scheme = True
81+
else:
82+
rest = proxy_value
83+
scheme = ''
84+
has_scheme = False
85+
86+
creds_part, server_part = rest.split('@', 1)
7887
username, password = creds_part.split(':', 1)
79-
return True, username, password, server_part
88+
89+
clean_proxy = f"{scheme}://{server_part}" if has_scheme else server_part
90+
return True, username, password, clean_proxy
8091
except ValueError:
8192
return False, None, None, proxy_value
8293

0 commit comments

Comments
 (0)