creepy-phantomjs-runner
v1.0.2
Published
creepy-phantomjs-runner
Downloads
30
Maintainers
Readme
creepy-phantomjs-runner
PhantomJS adapter for creepy web downloader.
Install
$ npm install creepy-phantomjs-runner --save
Usage
var runner = require('creepy-phantomjs-runner')()
.js('/path/to/jquery.js')
.js('/path/to/analyzer.js')
.on('result', (output, url) => {
console.log('The result is: ' + output)
// The result is: Google
// (and there is a '\n' at the end)
})
.on('error', (err) => {
console.log(err)
})
runner.open('http://www.google.com')
In '/path/to/analyzer.js'
:
console.log('creepy-phantomjs-runner:' + jQuery('#hplogo').attr('title'))
Notice
Notice that, in order to distinguish with other console.log()
ed message, only the log message which starts with 'creepy-phantomjs-runner:'
will be output.
License
MIT