phantomjs向nodejs传数据
发布于 8 年前 作者 meloszz 5185 次浏览 来自 问答

我用Phantomjs从网站爬了点数据,现在想把它传给调用phantomjs文件的nodejs文件,请问有什么办法? 我现在只能把数据写到一个txt文件里,再读出来,请问有没有更好的办法? 比如我在Nodejs里开一个子进程,能不能在ls.on里获得Phantomjs的数据? var ls = cp.spawn(“phantomjs”, [“pachong.js”, result[n].url, result[n].id]); ls.on(“close”, function(code) {

}

回到顶部