javascript - phantom process died when I use node-horseman to open phantomjs with nodejs -


when used 'node-horseman' control phantomjs node.js, have met problem:

unhandled rejection headlesserror: phantom process died @ clientrequest. (/users/zhuyingda/nodejs/veneno/node_modules/node-phantom-simple/node-phantom-simple.js:655:12) @ emitone (events.js:77:13) @ clientrequest.emit (events.js:169:7) @ socket.socketonend (_http_client.js:288:9) @ emitnone (events.js:72:20) @ socket.emit (events.js:166:7) @ endreadablent (_stream_readable.js:905:12) @ dontcallback2 (node.js:441:9) @ process._tickcallback (node.js:355:17) 

i run code:

var horseman = require('node-horseman'); var horseman = new horseman(); horseman   .useragent("mozilla/5.2 (windows nt 6.1; wow64; rv:27.0) gecko/20100101 firefox/27.0")   .on('resourcerequested', function (requestdata, networkrequest) {     if(!/[png|jpg|js|css]$/.test(requestdata.url)){       console.log(requestdata.url);     }   }) .open('http://www.zhuyingda.com') .log() // prints out number of results .close(); 

i sure network fine , can connect website in browser,and can curl url , response something. if open charles or other vpn program, problem fixed. wanna know why?


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -