Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 06:56 PM
If you want to capture browser screenshot, you can use playwright
%sh
pip install playwright
playwright install
sudo apt-get update
playwright install-deps
from playwright.async_api import async_playwright
async with async_playwright() as p:
browser = await p.chromium.launch()
page = await browser.new_page()
await page.goto("https://google.com")
await page.screenshot(path="results.png", full_page=True)
await browser.close()