The first part is the webpage and source save//Upon page Load.var fs = require ("FS"); var resourcewait = Maxrenderwait = 10000, url= ' http://handsup-releases.eu/'; var page = require (' webpage ' ). Create (), Count = 0, forcedrendertimeout, rendertimeout;page.settings = {useragent: ' mozilla/5.0 (Wi Ndows NT 6.1; WOW64) applewebkit/537.36 (khtml, like Gecko) chrome/50.0.2661.75 safari/537.36 ', Javascriptenabled:true, LoadIma Ges:true};p age.viewportsize = {width:1280, height:1024};function dorender () {page.render (' twitter.png '); Fs.write (' 1.html ', Page.content, ' W '); Phantom.exit ();} page.onresourcerequested = function (req) {count + = 1; Console.log (' > ' + req.id + '-' + req.url); Cleartimeout (rendertimeout);}; page.onresourcereceived = function (res) {if (!res.stage | | res.stage = = = ' End ') {count-= 1; Console.log (res.id + ' + res.status + '-' + res.url); if (count = = = 0) {rendertimeout = SetTimeout (DorendeR, Resourcewait); }}};p age.open (URL, function (status) {if (Status!== "Success") {Console.log (' Unable to load URL '); Phantom.exit (); } else {forcedrendertimeout = SetTimeout (function () {Console.log (count); Dorender (); }, maxrenderwait); }});
Follow the update status of your webpage to get the latest handsup messages.