Speed ​​up phantomjs screen capture time?

When running the rasterize.js example provided by PhantomJS, I believe that I need to wait 20 seconds or more until a webpage image is created.

Is there any possible way to speed this up without consuming a lot of resources? Basically, I want to quickly create a series of sequential images taken from web pages downloaded using PhantomJS. It would be great if I could transfer Phantomjs in some way to the video stream.

Now I would be looking for something that just takes a screenshot of a webpage within 1 ~ 2 seconds using PhantomJS. If you already have a project or library that will do this, that will be great too.

+3
source share
1 answer

URL- html-, :

  • html
  • PhantomJS - , WebKit.

, https://github.com/eugenehp/node-crawler/blob/master/test/simple.js

var Crawler = require("../lib/crawler").Crawler;

var c = new Crawler({
    "maxConnections":10,
    // "timeout":60,
    "debug":true,
    callback:function(error,result,$) {
        console.log("Got page");
        $("img").each(function(i,img) {
             console.log(img.src);
        })
    }
});

c.queue(["http://jamendo.com/","http://tedxparis.com"]);
-1

All Articles