visit is a PhantomJS-based node module.
It's designed to visits one or multiple urls, runs a CommonJS-aware script in
the context of the page once the page is loaded, grab whatever response it gets
back through the
window.callPhantom() method and parse it as JSON.
visit's goal is just to be a robust wrapper around PhantomJS, focused on a
single task: get specific data out of a publicly available Web page.
visit(url, script[, options], callback)
script onload (note
script can import other CJS modules)
callback upon completition with the object passed from
options is… optional. It accepts the following values:
int): the length, in
msbefore a request is killed. Defaults to none.
int): number of attempts at visiting the page before reporting an error (note this uses an exponential backoff). Defaults to
int): time in
msbefore the second attempt, default to
str): Path to the PhantomJS JSON config file. Optional.
visitPages(urls, script[, options], callback)
Sequenctially visits every
url in the
urls array, run
script for each page
script can import other CJS modules). Passes the output of visiting
url as an array to the callback.
Options are the same as for