Skip to content

Commit ff8f1e2

Browse files
committed
black formatting
1 parent 29f0e23 commit ff8f1e2

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

stagehand/main.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -515,17 +515,24 @@ async def init(self):
515515
# Set up download behavior via CDP
516516
try:
517517
# Create CDP session for the page
518-
cdp_session = await self._context.new_cdp_session(self._playwright_page)
518+
cdp_session = await self._context.new_cdp_session(
519+
self._playwright_page
520+
)
519521
# Enable download behavior
520-
await cdp_session.send("Browser.setDownloadBehavior", {
521-
"behavior": "allow",
522-
"downloadPath": "downloads",
523-
"eventsEnabled": True
524-
})
522+
await cdp_session.send(
523+
"Browser.setDownloadBehavior",
524+
{
525+
"behavior": "allow",
526+
"downloadPath": "downloads",
527+
"eventsEnabled": True,
528+
},
529+
)
525530

526531
self.logger.debug(f"Set up CDP download behavior")
527532
except Exception as e:
528-
self.logger.warning(f"Failed to set up CDP download behavior: {str(e)}")
533+
self.logger.warning(
534+
f"Failed to set up CDP download behavior: {str(e)}"
535+
)
529536
# Continue without download support - non-critical feature
530537

531538
except Exception:

0 commit comments

Comments
 (0)