from pathlib import Path
import os
from browshot import BrowshotClient

client = BrowshotClient(os.environ["BROWSHOT_API_KEY"])
html = client.screenshot_html(1103982291, {})
if not html:
    raise RuntimeError("HTML download failed")
Path("capture.html").write_bytes(html)
