初学nodejs,想搞个crawler,搜索了下在github上发现有个node-crawler,于是NPM,然后复制范例,编译运行,报错...(范例代码可在github的项目首页上找到)
$("#content a").each(function(a) {
^ TypeError: undefined is not a function
at Object.Crawler.callback (D:\Study\nodejs\myCrawler\index.js:10:9)
at exports.Crawler.self.onContent.jsdom.env.done (D:\Study\nodejs\myCrawler\node_modules\crawler\lib\crawler.js:212:37)
at exports.env.exports.jsdom.env.scriptComplete (D:\Study\nodejs\myCrawler\node_modules\crawler\node_modules\jsdom\lib\jsdom.js:205:39)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
想来应该是jquery路径的问题?可是我查了貌似没问题啊,我直接NPM的什么都没改啊,麻烦大家帮忙看看可能是什么原因 环境 OS:Windows NodeJS:0.8.15 (x64)