Plwrftapi / take_ss.py
09u2h4n's picture
testing
e0c5f64
raw
history blame
269 Bytes
from playwright.sync_api import sync_playwright
def take_screenshot(url, path):
with sync_playwright() as p:
browser = p.firefox.launch()
page = browser.new_page()
page.goto(url)
page.screenshot(path=path)
browser.close()