0.0.3 • Published 10 years ago

phantom-scraper v0.0.3

Weekly downloads
1
License
MIT
Repository
-
Last release
10 years ago

Phantom Scraper

promise based interface to inject a script into a phantom browser and resolve a result

Usage

var phantomScraper = require('phantom-scraper');

var injectionPayload = function() {
  return jQuery('h1').text()
};

phantomScraper({
  uri: "http://example.com/",
  scriptInclude: "//code.jquery.com/jquery-latest.min.js",
  scriptEvaluate: injectionPayload,
  evaluationTimeout: 5000,
  noConflict: function() { $.noConflict(); }
})
.then(function(result){
  console.log('SCRAPE RESULTS:', result);
});

development

to run the development tests make sure mocha is installed with npm install -g mocha, then run npm test or mocha.

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago