初始化后是否可以将任务链接到 spookyjs?像这样的东西:
Spooky = require('spooky');
var spooky = new Spooky({
child: {
transport: 'http'
},
casper: {
logLevel: 'debug',
verbose: true
}
}, function (err) {
if (err) {
e = new Error('Failed to initialize SpookyJS');
e.details = err;
throw e;
}
spooky.start(
'http://en.wikipedia.org/wiki/Spooky_the_Tuff_Little_Ghost');
spooky.run();
});
spooky.thenOpen('http://google.com', function () {
console.log('bla');
});
spooky.on('console', function (line) {
console.log(line);
});
但是当我这样做时,我得到了这个错误:
类型错误:对象 # 没有方法 'thenOpen'