使用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