action-at-a-distance

Use Socket.io to drive CasperJS

npm install action-at-a-distance
99 downloads in the last month

A socket based Javascript screen scraping NodeJS module. Static and dynamic Ajax pages can be scraped on the client (in a Browser), or on the server using Node.js.

How does it work?

Communication occurs through Socket.io, which is automagically injected into every remote nonlocal page; loaded in a headless PhantomJS browser on the server.

Remote nonlocal pages are sent Javascript (through Socket.io), and the local client receives results through the same socket; whether in the browser or on the server. Results can be sent asynchronously as they appear on the nonlocal page; see the Twitter demo.

Install

Prerequisites

  • Node.js
  • PhantomJS
  • CasperJS
  • JQuery (if using the client API)

Demos

Includes demos built with Yeoman Express-Stack and AngularJS. To run the demos:

  1. Install Yeoman Express-Stack
    1. git clone https://github.com/egonz/action-at-a-distance.git; cd $_
    2. npm install
    3. yeomen server
npm loves you