现在都是调用网站的api,nodejs有没这样的包? 给定的浏览器,然后在内存中渲染出页面,然后保存为图片,在命令行调用的
回复 (8)
C
mark
L
以前看到过一个 https://github.com/juliangruber/url-to-screenshot 不过没玩过
E
有了phantomjs此类问题,就变得简单了,当然,可以用一些其他的库
Y
引用 luoyjx以前看到过一个 https://github.com/juliangruber/url to screenshot 不过没玩过
Error: Command failed: C:\windows\system32\cmd.exe /s /c "phantomjs c:\nodejs\node_modules\url-to-screenshot/script/render.js http://ghub.io/ 800 600 0 PNG false --ignore-ssl-errors --ssl-protocol=sslv3" 'phantomjs' �����ڲ����ⲿ���Ҳ���ǿ����еij��
这个好象不是用nodejs模块生成图象 是用命令行启动phantomjs 然后发送指令, nodejs和 phantomjs两个进程是怎么通信的呢?
L
用这个Chrome 插件生成页面截图很方便。页面缩略图就再缩一下吧。
L
I
mk
参与回复
登录后即可参与回复。登录