使用npm,我抓住了这个包。 https://npmjs.org/package/phantom-crawl在.js文件中包含node.js模块的语法?
我该如何运行它? - 该example script给了我这个错误:
Error: Cannot find module './src/PhantomCrawl'
phantomjs://bootstrap.js:289
phantomjs://bootstrap.js:254 in require
example.js:3
特别需要这条线改变;但不确定的路径的NodeJS语法用于此:
var PhantomCrawl = require('./src/PhantomCrawl');
奇怪的是,它为我工作。你使用什么Node版本?我在0.10.13。 – gustavohenke
我也在0.10.13。我敢肯定,'git克隆'它会工作;然而,我试图弄清楚如何从'npm install phantom-crawl'中执行它...... – stackoverflowuser95