agentsib / siteshot
网站截图工具
v1.0.3
2017-04-28 10:50 UTC
Requires
- h4cc/wkhtmltoimage-amd64: ^0.12.3
- imagine/imagine: ^0.6.3
- silex/silex: ^2.0
- symfony/process: ^3.2
This package is auto-updated.
Last update: 2024-08-28 09:12:37 UTC
README
网站截图工具
生成网站图片的Web服务。使用Silex框架编写。使用 wkhtmltopdf。
运行
docker run -d -p 8080:80 -v /tmp/siteshot_cache:/var/www/shot/cache agentsib/siteshot:latest
现在尝试 localhost:8080
使用方法
https://:8080/{mode}/{sizes}/{fwidth}/{format}/t{timeout}?{url}
- mode -
corner
或resize
- sizes - 截图大小(例如 400 或 400x500)
- fwidth - 对于
corner
- 裁剪左上角框的宽度和高度,对于resize
- 最大宽度 - format -
png
或jpg
- timeout - 加载页面内容后的等待时间(默认:1)。适用于带有Flash的网站。例如:t1 或 t10
- url - 捕获的url
如果创建截图失败,则返回http状态404。
示例
http://siteshot.dev/resize/800x600/400/png?http://google.com
http://siteshot.dev/resize/800x600/400/png/t5?http://speedtest.net
http://siteshot.dev/corner/800x600/400/png?http://vk.com
开发
显示symfony错误
docker run -ti -p 8080:80 -e DEBUG=1 -v /path/to/siteshot-php:/var/www/shot agentsib/siteshot:latest