【文件属性】:
文件名称:热点:拍摄DOM元素的屏幕截图
文件大小:80KB
文件格式:ZIP
更新时间:2021-01-31 05:36:35
html docker chrome dom puppeteer
热门人物
拍摄DOM元素的屏幕截图,例如Jake Gyllenhaal :camera_with_flash:
查看。
开始(没有Docker)
确保您已经安装了当前节点并安装了yarn。 然后:
$ yarn install
$ TARGET_HOST="https://www.innoq.com" yarn start
开始(使用Docker)
建立图片:
$ docker build -t innoq/hotshot .
启动服务器:
$ docker run -p 5000:5000 -e PORT=5000 -e TARGET_HOST='https://www.innoq.com' innoq/hotshot
要求截图:
$ curl -G "http://localhost:5000/shoot?path=/relative/path&selector=.my-css-class" > screenshot.png
【文件预览】:
hotshot-master
----.travis.yml(828B)
----package.json(740B)
----.eslintrc.json(61B)
----.eslintcache(252B)
----docker-entrypoint(104B)
----Dockerfile(2KB)
----LICENSE(11KB)
----.gitignore(37B)
----.dockerignore(14B)
----app.js(3KB)
----README.md(649B)
----yarn.lock(175KB)
----scripts()
--------deploy(269B)