creepy-phantomjs-runner 1.0.2 • Public • Published 8 years ago
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 )
} )
. 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
Package Sidebar Install npm i creepy-phantomjs-runner
Downloads Weekly Downloads