Questions tagged [spookyjs]

SpookyJS makes it possible to drive CasperJS suites from Node.js. At a high level, Spooky accomplishes this by spawning Casper as a child process and controlling it via RPC.

SpookyJS makes it possible to drive CasperJS suites from Node.js. At a high level, Spooky accomplishes this by spawning Casper as a child process and controlling it via RPC.

Specifically, each Spooky instance spawns a child Casper process that runs a bootstrap script. The bootstrap script sets up a JSON-RPC server that listens for commands from the parent Spooky instance over a transport (either HTTP or stdin). The script also sets up a JSON-RPC client that sends events to the parent Spooky instance via stdout.

Source: https://github.com/WaterfallEngineering/SpookyJS

See also:

62 questions
11
votes
3 answers

Error - running spookyjs

I am getting the following error in windows while running spookyjs but code is working in linux. Error events.js:85 throw er; // Unhandled 'error' event ^ Error: spawn casperjs ENOENT at exports._errnoException (util.js:746:11 at…
karthick
  • 5,998
  • 12
  • 52
  • 90
5
votes
2 answers

How to perfectly isolate and clear environments between each test?

I'm trying to connect to SoundCloud using CasperJS. What is interesting is once you signed in and rerun the login feature later, the previous login is still active. Before going any further, here is the…
Julien Le Coupanec
  • 7,742
  • 9
  • 53
  • 67
4
votes
1 answer

How to deploy a phantomjs node app on AWS Lambda?

I threw together a small Lambda function together to crawl a website using the SpookyJS, CasperJS, and PhantomJS toolchain for headless browsing. The task is quite simple, and at some point a few months ago it was working in Lambda. I recently had…
ryanhallcs
  • 237
  • 1
  • 14
3
votes
1 answer

spawn casperjs ENOENT error on AWS elastic beanstalk

I am trying to run a casper scraper on nodejs using SPOOKY. The scraper works fine when I run it on the localhost but gives the error below when I deploy the project on AWS elastic beanstalk server. Error: spawn casperjs ENOENT at…
3
votes
0 answers

Spookyjs error with Child terminated with non-zero exit code 3221225477

all I can run spookyjs program without a problem. However, if it runs over long period of time, e.g. 24 hours or 48 hours, continuously the program stops with this message. Anyone got a clue for this error? It could be other environment issue as…
smith
  • 31
  • 1
3
votes
1 answer

Global Variable and External functions in SpookyJS

I'm new to SpookyJS/CasperJS and I'm trying to figure out the execution flow. This is what I'm trying to achieve: load a page store an image of the page pass this image to a function and execute it (this process is quite long: ~15 seconds) wait for…
lerio
  • 33
  • 4
3
votes
2 answers

How do you set slimerjs as the engine for casperjs when using spookyjs?

I'm driving casperjs through spookyjs and I want to use slimerjs, rather than phantomjs, as the engine for casperjs. When using casperjs you set the engine when calling casperjs from the command line like this: casperjs *scriptname*…
celeritas
  • 2,191
  • 1
  • 17
  • 28
2
votes
1 answer

How to emulate mouseover or run JS function on page with PhantomJS in NodeJS

NodeJS, PhantomJS, content parsing with Cheerio Need to parse webpage, that contains dynamically loaded div(hint). The event can be on many table td's, here is an example When I 'mouseover' on specific td I see this orange block with data, it's…
Evgeny Gil
  • 317
  • 5
  • 17
2
votes
2 answers

SpookyJs show all HTTP headers

I have a site that is behaving differently when I interact with it in a traditional browser versus spooky/casper/phantom. I would like to debug by printing out the entire http header requests and responses to the console or a file to see what is…
Ian Vasquez
  • 91
  • 1
  • 3
2
votes
1 answer

Store values from spookyjs environment into mongoDB

I am trying to scrape data from site by spookyjs and store in mongoDB.I am able to get data from the website.But not able to save scraped data from spookyjs environment to mongoDB.To save scraped data,I passed my database model instance to spookyjs…
2
votes
1 answer

CasperJS/SpookyJS css selector is existing and not-existing

I have a strange problem during screen scraping with spookyjs / capserjs. I want to catch information from the following website:…
solick
  • 2,325
  • 3
  • 17
  • 29
2
votes
0 answers

Get an array from SpookyJs to Meteor

After a lot of hard work, my SpookyJS script works as I should and I got my spoils of war, an array of values I want to use to query my Collection in my Meteor app, but I have a huge problem. I can't find a way to call any Meteor specific methods…
Carnivean
  • 51
  • 5
2
votes
1 answer

reducing phantomjs/casperjs/spookyjs memory usage in infinte loop

I'm trying to scrape a page that uses infinite scroll using phantomjs casperjs and spooky. It is supposed to continue clicking the more button and taking the new links from the results until its stopped manually. The script however starts using more…
Bunker
  • 1,040
  • 3
  • 12
  • 25
2
votes
1 answer

How to call a function inside SpookyJS?

I have a function called clickMore: function clickMore(max, i){ i = i || 0; if ((max == null || i < max) && this.visible(moreButton)) { // synchronous // asynchronous steps... this.thenClick(moreButton); // sometimes the click is…
novicePrgrmr
  • 18,647
  • 31
  • 81
  • 103
2
votes
1 answer

SpookyJS example/hello.js fails with "throw er; // Unhandled 'error' event"

When I run the hello example from SpookyJS, it fails with the following error: $ node examples/hello.js events.js:72 throw er; // Unhandled 'error' event ^ Error: spawn ENOENT at errnoException (child_process.js:998:11) at…
Philipp Claßen
  • 41,306
  • 31
  • 146
  • 239
1
2 3 4 5