How do I take screenshots of web pages using ruby and a unix server? [closed]

。_饼干妹妹 提交于 2019-11-29 22:41:34

Selenium RC has a Ruby interface and can grab a screenshot using capture_screenshot(filename,kwargs).

You'd then have to shrink it to a thumbnail.

you might want to try this:

http://www.pageglimpse.com/

There is https://github.com/maxwell/screencap which uses phantom.js

There is a ruby wrapper for PageGlimpse available:

http://code.squidchunks.com/pageglimpse/

Unfortunately, the Terms of Use state that "You must not use or launch any automated system, including without limitation, "offline readers", "spiders," etc. to capture data provided by the Service."

You can use the gem gastly.

Gastly.capture('http://google.com', 'output.png')

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!