Skip to main content

Chrome Headless

  • DevToolsActivePort
    • 第一行为端口
    • 第二行为 路径 /devtools/browser/UUID
chrome --headless --remote-debugging-port=9222 --disable-gpu --no-sandbox

# /devtools/inspector.html?ws=127.0.0.1:9222/devtools/page/6BD1FB9A428F479750451F5E652F544F
curl http://localhost:9222/json
--enable-blink-features=SomeNewFeature,SomeOtherNewFeature
--disable-blink-features=SomeOldFeature

FAQ

playwright vs puppeteer

New Headless

Debugging connection was closed. Reason: WebSocket disconnected