Skip to content

Playwright content fetcher

Cameron Clapp edited this page May 27, 2022 · 23 revisions

Fetching content using Playwright

You can fetch pages using the excellent and very fast Playwright backend https://docs.browserless.io/docs/docker-quickstart.html

See docker-compose.yml for more examples

Set the environment variable PLAYWRIGHT_DRIVER_URL to ws://127.0.0.1:3000

Docker Compose based

In docker-compose.yml uncomment these lines

environment:
        - PLAYWRIGHT_DRIVER_URL=ws://playwright-chrome:3000/

playwright-chrome:
        hostname: playwright-chrome
        image: browserless/chrome
        restart: unless-stopped

Docker based

docker run -d --name browserless \ 
   -e "DEFAULT_LAUNCH_ARGS=[\"--window-size=1920,1080\"]" \
   --rm  -p 3000:3000 \
   --shm-size="2g" \
  browserless/chrome:1.53-chrome-stable

Pip install based

@todo

Clone this wiki locally