File tree Expand file tree Collapse file tree 2 files changed +1
-28
lines changed
Expand file tree Collapse file tree 2 files changed +1
-28
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " stagehand"
7- version = " 0.0.5 "
7+ version = " 0.0.6 "
88description = " Python SDK for Stagehand"
99readme = " README.md"
1010license = {text = " MIT" }
Original file line number Diff line number Diff line change @@ -374,33 +374,6 @@ async def extract(
374374 )
375375 return result_dict
376376
377- async def screenshot (self , options : Optional [dict ] = None ) -> str :
378- """
379- Take a screenshot of the current page via the Stagehand server.
380-
381- Args:
382- options (Optional[dict]): Optional screenshot options.
383- May include:
384- - type: "png" or "jpeg" (default: "png")
385- - fullPage: whether to take a full page screenshot (default: False)
386- - quality: for jpeg only, 0-100 (default: 80)
387- - clip: viewport clip rectangle
388- - omitBackground: whether to hide default white background (default: False)
389-
390- Returns:
391- str: Base64-encoded screenshot data.
392- """
393- payload = options or {}
394-
395- if self ._stagehand .use_api :
396- lock = self ._stagehand ._get_lock_for_session ()
397- async with lock :
398- result = await self ._stagehand ._execute ("screenshot" , payload )
399-
400- return result
401- else :
402- return await self ._page .screenshot (** payload )
403-
404377 # Method to get or initialize the persistent CDP client
405378 async def get_cdp_client (self ) -> CDPSession :
406379 """Gets the persistent CDP client, initializing it if necessary."""
You can’t perform that action at this time.
0 commit comments