fix some bugs

This commit is contained in:
shenchucheng 2024-07-11 14:25:24 +08:00
parent dbc017c5c7
commit ec021bd0e1
4 changed files with 7 additions and 4 deletions

View file

@ -121,7 +121,7 @@ class Browser:
await scroll_page(self.page, direction)
return await self._wait_page()
async def goto(self, url: str, timeout: float = 30000):
async def goto(self, url: str, timeout: float = 90000):
"""Navigate to a specific URL."""
if self.page is None:
await self.start()

View file

@ -115,8 +115,9 @@ class Terminal:
# '\r' is changed to '\n', resulting in excessive output.
tmp = b""
while True:
self.process.communicate()
output = tmp + await self.process.stdout.read(1)
if not output:
continue
*lines, tmp = output.splitlines(True)
for line in lines:
line = line.decode()