News for hackers. Stuff that matters.
Re:Ask HN: Possible to take automatic screenshot of webpage ... by veidr on Thursday December 29, 2011 @05:43PM (#3405761)
It'd be dead easy with PhantomJS. A script to do it would look something like:

---

    p = new WebPage()

    p.open "http://example.com/whatever", (status) ->
        console.log "☆ LOAD STATUS: #{status}"
        p.render "/Users/Shared/screenshot.png"
---

If you want to get fancy, you can code your script to render only a subregion of the page. Phantom can automate pretty much anything you can do yourself with a browser.

http://www.phantomjs.org

There are no comments on this comment yet.