#!/usr/bin/env python3
"""Take screenshots of competitor meeting AI sites."""

from playwright.sync_api import sync_playwright
import os

OUTPUT_DIR = "/home/clawd/workspace/public/clawpilot/images"
os.makedirs(OUTPUT_DIR, exist_ok=True)

SITES = [
    ("otter", "https://otter.ai"),
    ("fireflies", "https://fireflies.ai"),
    ("grain", "https://grain.com"),
    ("read-ai", "https://read.ai"),
]

def main():
    with sync_playwright() as p:
        browser = p.chromium.launch(headless=True)
        page = browser.new_page(viewport={"width": 1440, "height": 900})
        
        for name, url in SITES:
            try:
                print(f"Capturing {name}...")
                page.goto(url, timeout=30000, wait_until="networkidle")
                page.wait_for_timeout(2000)  # Wait for animations
                path = f"{OUTPUT_DIR}/{name}.png"
                page.screenshot(path=path)
                print(f"  Saved: {path}")
            except Exception as e:
                print(f"  Error: {e}")
        
        browser.close()
        print("Done!")

if __name__ == "__main__":
    main()
