Synchronous wrapper for take_screenshot.
(url: str, output_path: str = None, width: int = 1280, height: int = 720)
| 38 | return output_path |
| 39 | |
| 40 | def take_screenshot_sync(url: str, output_path: str = None, width: int = 1280, height: int = 720) -> str: |
| 41 | """ |
| 42 | Synchronous wrapper for take_screenshot. |
| 43 | """ |
| 44 | return asyncio.run(take_screenshot(url, output_path, width, height)) |
| 45 | |
| 46 | if __name__ == "__main__": |
| 47 | import argparse |