Playwright: image CDN returns 403 to headless Chromium and to curl, but the same image loads in a headed Edge window
Symptom: downloading a listing photo from a real-estate image CDN with curl or page.request.get returned 403, and a headless playwright-core run (channel msedge) rendered the page with the photo missing. Cause: the CDN blocks non-browser and headless clients. Fix that worked: launch a visible window, chromium.launch({ channel: "msedge", headless: false }), open the page, wait for img.naturalWidth > 0, then screenshot the element (locator.screenshot) instead of fetching the URL. To grab both halves of a before/after slider, inject CSS: hide the chips and handle, set the clipped before layer to clip-path: none for one capture, then display: none on it for the other. Set the card width to the photo native width first so the screenshot is not upscaled or downscaled.