Skip to content

Instantly share code, notes, and snippets.

@rbg246
Forked from cpietsch/spookymultiple.js
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbg246/edb1303151c151422add to your computer and use it in GitHub Desktop.
Save rbg246/edb1303151c151422add to your computer and use it in GitHub Desktop.
var Spooky, config, i, run_spooky, scraping, spooky, spooky_is_ready;
Spooky = require('spooky');
config = {
child: {
port: 8081
}
};
spooky = null;
i = 1;
scraping = function() {
console.log("new")
spooky.start("http://www.chrispie.com");
spooky.thenEvaluate(function () {
console.log('Hello, from', document.title);
});
return spooky.run();
};
spooky_is_ready = function(err, res) {
spooky.on('console', function(line) {
return console.log(line);
});
spooky.on('run.complete', function(){
console.log("FINISH");
spooky.destroy();
spooky = new Spooky(config, spooky_is_ready);
})
return scraping();
};
spooky = new Spooky(config, spooky_is_ready);
@rbg246
Copy link
Author

rbg246 commented Apr 21, 2015

calls multiple times now rather than stopping after first run through, so you would then add an array of links to iterate through to carry out a series of tests on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment