1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-27 09:18:43 +00:00

update browserless

This commit is contained in:
kev 2018-11-13 17:38:17 +08:00
parent fb21c7ddd3
commit 7f2e3e9316

@ -1,6 +1,10 @@
browserless browserless
=========== ===========
[Browserless][1] makes it easy to run your puppeteer scripts in an optimized
way. It takes care of all the binaries and managing of Chrome so you don't have
to.
## docker-compose.yml ## docker-compose.yml
```yaml ```yaml
@ -40,6 +44,15 @@ const puppeteer = require('puppeteer');
```bash ```bash
$ docker-compose up -d $ docker-compose up -d
$ PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install puppeteer $ PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install puppeteer
$ node screenshot.js $ node screenshot.js
$ imgcat google.png $ imgcat google.png
$ http http://127.0.0.1:3000/screenshot \
url=https://www.youtube.com \
options:='{"fullPage":true}' \
gotoOptions:='{"waitUntil":"networkidle2"}' > youtube.png
$ imgcat youtube.png
``` ```
[1]: https://docs.browserless.io/