Nearsighted Paramecium Multiverse
    Wondering what’s next for npm?Check out our public roadmap! »

    creepy-phantomjs-runner

    1.0.2 • Public • Published

    Build Status

    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

    Install

    npm i creepy-phantomjs-runner

    DownloadsWeekly Downloads

    2

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • avatar