{"_id":"node-phantom","_rev":"31-fc9ae2fd93b1dcdac5a33b1dd9093713","name":"node-phantom","description":"bridge between node.js and PhantomJS","dist-tags":{"latest":"0.2.5"},"versions":{"0.1.0":{"author":{"name":"Alex Scheel Meyer","url":"http://www.linkedin.com/in/alexscheelmeyer"},"name":"node-phantom","description":"bridge between node.js and PhantomJS","version":"0.1.0","homepage":"https://github.com/alexscheelmeyer/node-phantom","repository":{"type":"git","url":"git://github.com/alexscheelmeyer/node-phantom.git"},"main":"node-phantom.js","scripts":{"test":"expresso"},"dependencies":{"socket.io":">=0.9.6"},"devDependencies":{"socket.io":">=0.9.2"},"optionalDependencies":{},"engines":{"node":"*"},"_npmUser":{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"},"_id":"node-phantom@0.1.0","_engineSupported":true,"_npmVersion":"1.1.19","_nodeVersion":"v0.6.16","_defaultsLoaded":true,"dist":{"shasum":"bdf906763b7ed5639fad906e9fc51040ad3e0f4a","tarball":"https://registry.npmjs.org/node-phantom/-/node-phantom-0.1.0.tgz","integrity":"sha512-4msIxpn8IQFSGFo2LZQhL+RV4QkhYHGkEsqsMGtRnvEUwtLW3HPUnCkwnK1eVoYPrLn8rqlxxAzZvSVT5jEXMg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDJ3z7PYYSBl0nxIc+qPJGCc31o5NU/gL74RjltGczROAiBvNZiE3j98OeiOr3zJSG2ZgxTYFo5Xzn0XVyIK+lpBEQ=="}]},"maintainers":[{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"}]},"0.1.1":{"author":{"name":"Alex Scheel Meyer","url":"http://www.linkedin.com/in/alexscheelmeyer"},"name":"node-phantom","description":"bridge between node.js and PhantomJS","version":"0.1.1","homepage":"https://github.com/alexscheelmeyer/node-phantom","repository":{"type":"git","url":"git://github.com/alexscheelmeyer/node-phantom.git"},"main":"node-phantom.js","scripts":{"test":"expresso"},"dependencies":{"socket.io":">=0.9.6"},"devDependencies":{"socket.io":">=0.9.2"},"optionalDependencies":{},"engines":{"node":"*"},"readme":"Node-phantom\n---------------\n\nThis is a bridge between [PhantomJs](http://phantomjs.org/) and [Node.js](http://nodejs.org/).\n\nIt is very much similar to the other bridge available, [PhantomJS-Node](https://github.com/sgentle/phantomjs-node), but is different in a few ways:\n\n  - Way fewer dependencies/layers.\n  - API has the idiomatic error indicator as first parameter to callbacks.\n  - Uses plain Javascript instead of Coffeescript.\n\n\nRequirements\n------------\nYou will need to install PhantomJS first. The bridge assumes that the \"phantomjs\" binary is available in the PATH.\n\nThe only other dependency for using it is [socket.io](http://socket.io/).\n\nFor running the tests you will need [Expresso](http://visionmedia.github.com/expresso/).\n\n\nInstalling\n----------\n\n    npm install node-phantom\n\n\nUsage\n-----\nYou can use it pretty much like you would use PhantomJS-Node, for example this is an adaptation of a [web scraping example](http://net.tutsplus.com/tutorials/javascript-ajax/web-scraping-with-node-js/) :\n\n```javascript\nvar phantom=require('node-phantom');\nphantom.create(function(err,ph) {\n  return ph.createPage(function(err,page) {\n    return page.open(\"http://tilomitra.com/repository/screenscrape/ajax.html\", function(err,status) {\n      console.log(\"opened site? \", status);\n      page.includeJs('http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', function(err) {\n        //jQuery Loaded.\n        //Wait for a bit for AJAX content to load on the page. Here, we are waiting 5 seconds.\n        setTimeout(function() {\n          return page.evaluate(function() {\n            //Get what you want from the page using jQuery. A good way is to populate an object with all the jQuery commands that you need and then return the object.\n            var h2Arr = [],\n            pArr = [];\n            $('h2').each(function() {\n              h2Arr.push($(this).html());\n            });\n            $('p').each(function() {\n              pArr.push($(this).html());\n            });\n\n            return {\n              h2: h2Arr,\n              p: pArr\n            };\n          }, function(err,result) {\n            console.log(result);\n            ph.exit();\n          });\n        }, 5000);\n      });\n\t});\n  });\n});\n```\n\nYou can also have a look at the test folder to see some examples of using the API.\n\nOther\n-----\nMade by Alex Scheel Meyer. Released to the public domain.\n\n","_id":"node-phantom@0.1.1","dist":{"shasum":"4857b2290a942d6c5b76dae35744b252032bd0ab","tarball":"https://registry.npmjs.org/node-phantom/-/node-phantom-0.1.1.tgz","integrity":"sha512-m1G1V1EOedolA+7rSxRzoP5joB60gGIFwIVBoBI+QFSUq6a7vpUAuzx8+qjGv9R87S0LVXx748hKigx41cHXzQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGBM/keUIg4H3D/17XTDZFhxdN9c2XtI2noKLvn85yDdAiEA7eCYJQiNIE6l493ms1pypjXw0peh6ooOHeNFXMZkD/k="}]},"maintainers":[{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"}]},"0.1.2":{"author":{"name":"Alex Scheel Meyer","url":"http://www.linkedin.com/in/alexscheelmeyer"},"name":"node-phantom","description":"bridge between node.js and PhantomJS","version":"0.1.2","homepage":"https://github.com/alexscheelmeyer/node-phantom","repository":{"type":"git","url":"git://github.com/alexscheelmeyer/node-phantom.git"},"main":"node-phantom.js","scripts":{"test":"expresso"},"dependencies":{"socket.io":">=0.9.6"},"devDependencies":{"socket.io":">=0.9.2"},"optionalDependencies":{},"engines":{"node":"*"},"readme":"Node-phantom\n---------------\n\nThis is a bridge between [PhantomJs](http://phantomjs.org/) and [Node.js](http://nodejs.org/).\n\nIt is very much similar to the other bridge available, [PhantomJS-Node](https://github.com/sgentle/phantomjs-node), but is different in a few ways:\n\n  - Way fewer dependencies/layers.\n  - API has the idiomatic error indicator as first parameter to callbacks.\n  - Uses plain Javascript instead of Coffeescript.\n\n\nRequirements\n------------\nYou will need to install PhantomJS first. The bridge assumes that the \"phantomjs\" binary is available in the PATH.\n\nThe only other dependency for using it is [socket.io](http://socket.io/).\n\nFor running the tests you will need [Expresso](http://visionmedia.github.com/expresso/). The tests require PhantomJS 1.6 or newer to pass.\n\n\nInstalling\n----------\n\n    npm install node-phantom\n\n\nUsage\n-----\nYou can use it pretty much like you would use PhantomJS-Node, for example this is an adaptation of a [web scraping example](http://net.tutsplus.com/tutorials/javascript-ajax/web-scraping-with-node-js/) :\n\n```javascript\nvar phantom=require('node-phantom');\nphantom.create(function(err,ph) {\n  return ph.createPage(function(err,page) {\n    return page.open(\"http://tilomitra.com/repository/screenscrape/ajax.html\", function(err,status) {\n      console.log(\"opened site? \", status);\n      page.includeJs('http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', function(err) {\n        //jQuery Loaded.\n        //Wait for a bit for AJAX content to load on the page. Here, we are waiting 5 seconds.\n        setTimeout(function() {\n          return page.evaluate(function() {\n            //Get what you want from the page using jQuery. A good way is to populate an object with all the jQuery commands that you need and then return the object.\n            var h2Arr = [],\n            pArr = [];\n            $('h2').each(function() {\n              h2Arr.push($(this).html());\n            });\n            $('p').each(function() {\n              pArr.push($(this).html());\n            });\n\n            return {\n              h2: h2Arr,\n              p: pArr\n            };\n          }, function(err,result) {\n            console.log(result);\n            ph.exit();\n          });\n        }, 5000);\n      });\n\t});\n  });\n});\n```\n\nYou can also have a look at the test folder to see some examples of using the API.\n\nOther\n-----\nMade by Alex Scheel Meyer. Released to the public domain.\n\n","_id":"node-phantom@0.1.2","dist":{"shasum":"cda4368e9b3df897278116013f10550ad1eb894b","tarball":"https://registry.npmjs.org/node-phantom/-/node-phantom-0.1.2.tgz","integrity":"sha512-Rx5XMNtmTYCqgi4y8YQhyprrzZ+pAn5OCx23KZSxFW/XsIR9Dfl7m3D2jvKNHm1CVqNJ/R5P5LVXksOXkvfC8g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDw/SzVSTEs60EF5eJzF5YW6e2Jj0TBDGRy+318R9zGiAIgePlhEvk/kSUpayLugBfPIlOyQ/vtnQUOwy3Lui8OKmM="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"},"maintainers":[{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"}]},"0.2.0":{"author":{"name":"Alex Scheel Meyer","url":"http://www.linkedin.com/in/alexscheelmeyer"},"name":"node-phantom","description":"bridge between node.js and PhantomJS","version":"0.2.0","homepage":"https://github.com/alexscheelmeyer/node-phantom","repository":{"type":"git","url":"git://github.com/alexscheelmeyer/node-phantom.git"},"main":"node-phantom.js","scripts":{"test":"expresso"},"dependencies":{"socket.io":">=0.9.6"},"devDependencies":{"socket.io":">=0.9.2"},"optionalDependencies":{},"engines":{"node":"*"},"readme":"Node-phantom\n---------------\n\nThis is a bridge between [PhantomJs](http://phantomjs.org/) and [Node.js](http://nodejs.org/).\n\nIt is very much similar to the other bridge available, [PhantomJS-Node](https://github.com/sgentle/phantomjs-node), but is different in a few ways:\n\n  - Way fewer dependencies/layers.\n  - API has the idiomatic error indicator as first parameter to callbacks.\n  - Uses plain Javascript instead of Coffeescript.\n\n\nRequirements\n------------\nYou will need to install PhantomJS first. The bridge assumes that the \"phantomjs\" binary is available in the PATH.\n\nThe only other dependency for using it is [socket.io](http://socket.io/).\n\nFor running the tests you will need [Expresso](http://visionmedia.github.com/expresso/). The tests require PhantomJS 1.6 or newer to pass.\n\n\nInstalling\n----------\n\n    npm install node-phantom\n\n\nUsage\n-----\nYou can use it pretty much like you would use PhantomJS-Node, for example this is an adaptation of a [web scraping example](http://net.tutsplus.com/tutorials/javascript-ajax/web-scraping-with-node-js/) :\n\n```javascript\nvar phantom=require('node-phantom');\nphantom.create(function(err,ph) {\n  return ph.createPage(function(err,page) {\n    return page.open(\"http://tilomitra.com/repository/screenscrape/ajax.html\", function(err,status) {\n      console.log(\"opened site? \", status);\n      page.includeJs('http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', function(err) {\n        //jQuery Loaded.\n        //Wait for a bit for AJAX content to load on the page. Here, we are waiting 5 seconds.\n        setTimeout(function() {\n          return page.evaluate(function() {\n            //Get what you want from the page using jQuery. A good way is to populate an object with all the jQuery commands that you need and then return the object.\n            var h2Arr = [],\n            pArr = [];\n            $('h2').each(function() {\n              h2Arr.push($(this).html());\n            });\n            $('p').each(function() {\n              pArr.push($(this).html());\n            });\n\n            return {\n              h2: h2Arr,\n              p: pArr\n            };\n          }, function(err,result) {\n            console.log(result);\n            ph.exit();\n          });\n        }, 5000);\n      });\n\t});\n  });\n});\n```\n\n### phantom.create(callback,options)\n\n`options` is an optional object with options for how to start PhantomJS.\n`options.parameters` is an array of parameters that will be passed to PhantomJS on the commandline.\nFor example\n\n```javascript\nphantom.create(callback,{parameters:{'ignore-ssl-errors':'yes'}})\n```\n\nwill start phantom as:\n\n```bash\nphantomjs --ignore-ssl-errors=yes\n```\n\nYou may also pass in a custom path if you need to select a specific instance of PhantomJS or it is not present in PATH environment.\nThis can for example be used together with the [PhantomJS package](https://npmjs.org/package/phantomjs) like so:\n\n```javascript\nphantom.create(callback,{phantomPath:require('phantomjs').path})\n```\n\nYou can also have a look at the test folder to see some examples of using the API.\n\nOther\n-----\nMade by Alex Scheel Meyer. Released to the public domain.\n\n","_id":"node-phantom@0.2.0","dist":{"shasum":"27c8198a1bdedd7723b6e0538525e50d594c0ae0","tarball":"https://registry.npmjs.org/node-phantom/-/node-phantom-0.2.0.tgz","integrity":"sha512-BIYra5iRxzc0lEQtZJcqAorsTR1QyiCCm1lIzSorFNM6S0xVUPCXeJ4I6AUc4od4vmwU0morbcDaxZ/NqREKEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA/7rN88LYzL8bJi6RSQKxYgSfJIMRuHTPorYvkEW0EZAiBPMjlZZYDqdm5l86vhh5Sl1J6ODWPGiVqhXTS0RtG9oA=="}]},"_npmVersion":"1.1.61","_npmUser":{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"},"maintainers":[{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"}]},"0.2.1":{"author":{"name":"Alex Scheel Meyer","url":"http://www.linkedin.com/in/alexscheelmeyer"},"name":"node-phantom","description":"bridge between node.js and PhantomJS","version":"0.2.1","homepage":"https://github.com/alexscheelmeyer/node-phantom","repository":{"type":"git","url":"git://github.com/alexscheelmeyer/node-phantom.git"},"main":"node-phantom.js","scripts":{"test":"expresso"},"dependencies":{"socket.io":">=0.9.6"},"devDependencies":{"socket.io":">=0.9.2"},"optionalDependencies":{},"engines":{"node":"*"},"readme":"Node-phantom\n---------------\n\nThis is a bridge between [PhantomJs](http://phantomjs.org/) and [Node.js](http://nodejs.org/).\n\nIt is very much similar to the other bridge available, [PhantomJS-Node](https://github.com/sgentle/phantomjs-node), but is different in a few ways:\n\n  - Way fewer dependencies/layers.\n  - API has the idiomatic error indicator as first parameter to callbacks.\n  - Uses plain Javascript instead of Coffeescript.\n\n\nRequirements\n------------\nYou will need to install PhantomJS first. The bridge assumes that the \"phantomjs\" binary is available in the PATH.\n\nThe only other dependency for using it is [socket.io](http://socket.io/).\n\nFor running the tests you will need [Expresso](http://visionmedia.github.com/expresso/). The tests require PhantomJS 1.6 or newer to pass.\n\n\nInstalling\n----------\n\n    npm install node-phantom\n\n\nUsage\n-----\nYou can use it pretty much like you would use PhantomJS-Node, for example this is an adaptation of a [web scraping example](http://net.tutsplus.com/tutorials/javascript-ajax/web-scraping-with-node-js/) :\n\n```javascript\nvar phantom=require('node-phantom');\nphantom.create(function(err,ph) {\n  return ph.createPage(function(err,page) {\n    return page.open(\"http://tilomitra.com/repository/screenscrape/ajax.html\", function(err,status) {\n      console.log(\"opened site? \", status);\n      page.includeJs('http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', function(err) {\n        //jQuery Loaded.\n        //Wait for a bit for AJAX content to load on the page. Here, we are waiting 5 seconds.\n        setTimeout(function() {\n          return page.evaluate(function() {\n            //Get what you want from the page using jQuery. A good way is to populate an object with all the jQuery commands that you need and then return the object.\n            var h2Arr = [],\n            pArr = [];\n            $('h2').each(function() {\n              h2Arr.push($(this).html());\n            });\n            $('p').each(function() {\n              pArr.push($(this).html());\n            });\n\n            return {\n              h2: h2Arr,\n              p: pArr\n            };\n          }, function(err,result) {\n            console.log(result);\n            ph.exit();\n          });\n        }, 5000);\n      });\n\t});\n  });\n});\n```\n\n### phantom.create(callback,options)\n\n`options` is an optional object with options for how to start PhantomJS.\n`options.parameters` is an array of parameters that will be passed to PhantomJS on the commandline.\nFor example\n\n```javascript\nphantom.create(callback,{parameters:{'ignore-ssl-errors':'yes'}})\n```\n\nwill start phantom as:\n\n```bash\nphantomjs --ignore-ssl-errors=yes\n```\n\nYou may also pass in a custom path if you need to select a specific instance of PhantomJS or it is not present in PATH environment.\nThis can for example be used together with the [PhantomJS package](https://npmjs.org/package/phantomjs) like so:\n\n```javascript\nphantom.create(callback,{phantomPath:require('phantomjs').path})\n```\n\nYou can also have a look at the test folder to see some examples of using the API.\n\nOther\n-----\nMade by Alex Scheel Meyer. Released to the public domain.\n\n","_id":"node-phantom@0.2.1","dist":{"shasum":"46a8d33b838103738ef161f9a801263dd1b580fc","tarball":"https://registry.npmjs.org/node-phantom/-/node-phantom-0.2.1.tgz","integrity":"sha512-ebG5t9hbrR6ZLFXFe/UaYy9d4JW/nR05atx6DxoyRi54YAro60/+9l7mRhwT17yGev51NLDFWeV3cOHG+Us1iA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEMvr67OzZMKenaFvSvUhk1KSW5C4HM61t38ZC3Ni2lwIgKZ+CA7mFRUDqoGqgBQYFC6XlcRe6KBqweu4Bwe5uNNk="}]},"_npmVersion":"1.1.61","_npmUser":{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"},"maintainers":[{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"}]},"0.2.2":{"author":{"name":"Alex Scheel Meyer","url":"http://www.linkedin.com/in/alexscheelmeyer"},"name":"node-phantom","description":"bridge between node.js and PhantomJS","version":"0.2.2","homepage":"https://github.com/alexscheelmeyer/node-phantom","repository":{"type":"git","url":"git://github.com/alexscheelmeyer/node-phantom.git"},"main":"node-phantom.js","scripts":{"test":"expresso"},"dependencies":{"socket.io":">=0.9.6"},"devDependencies":{"socket.io":">=0.9.2"},"optionalDependencies":{},"engines":{"node":"*"},"readme":"Node-phantom\n---------------\n\nThis is a bridge between [PhantomJs](http://phantomjs.org/) and [Node.js](http://nodejs.org/).\n\nIt is very much similar to the other bridge available, [PhantomJS-Node](https://github.com/sgentle/phantomjs-node), but is different in a few ways:\n\n  - Way fewer dependencies/layers.\n  - API has the idiomatic error indicator as first parameter to callbacks.\n  - Uses plain Javascript instead of Coffeescript.\n\n\nRequirements\n------------\nYou will need to install PhantomJS first. The bridge assumes that the \"phantomjs\" binary is available in the PATH.\n\nThe only other dependency for using it is [socket.io](http://socket.io/).\n\nFor running the tests you will need [Expresso](http://visionmedia.github.com/expresso/). The tests require PhantomJS 1.6 or newer to pass.\n\n\nInstalling\n----------\n\n    npm install node-phantom\n\n\nUsage\n-----\nYou can use it pretty much like you would use PhantomJS-Node, for example this is an adaptation of a [web scraping example](http://net.tutsplus.com/tutorials/javascript-ajax/web-scraping-with-node-js/) :\n\n```javascript\nvar phantom=require('node-phantom');\nphantom.create(function(err,ph) {\n  return ph.createPage(function(err,page) {\n    return page.open(\"http://tilomitra.com/repository/screenscrape/ajax.html\", function(err,status) {\n      console.log(\"opened site? \", status);\n      page.includeJs('http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', function(err) {\n        //jQuery Loaded.\n        //Wait for a bit for AJAX content to load on the page. Here, we are waiting 5 seconds.\n        setTimeout(function() {\n          return page.evaluate(function() {\n            //Get what you want from the page using jQuery. A good way is to populate an object with all the jQuery commands that you need and then return the object.\n            var h2Arr = [],\n            pArr = [];\n            $('h2').each(function() {\n              h2Arr.push($(this).html());\n            });\n            $('p').each(function() {\n              pArr.push($(this).html());\n            });\n\n            return {\n              h2: h2Arr,\n              p: pArr\n            };\n          }, function(err,result) {\n            console.log(result);\n            ph.exit();\n          });\n        }, 5000);\n      });\n\t});\n  });\n});\n```\n\n### phantom.create(callback,options)\n\n`options` is an optional object with options for how to start PhantomJS.\n`options.parameters` is an array of parameters that will be passed to PhantomJS on the commandline.\nFor example\n\n```javascript\nphantom.create(callback,{parameters:{'ignore-ssl-errors':'yes'}})\n```\n\nwill start phantom as:\n\n```bash\nphantomjs --ignore-ssl-errors=yes\n```\n\nYou may also pass in a custom path if you need to select a specific instance of PhantomJS or it is not present in PATH environment.\nThis can for example be used together with the [PhantomJS package](https://npmjs.org/package/phantomjs) like so:\n\n```javascript\nphantom.create(callback,{phantomPath:require('phantomjs').path})\n```\n\nYou can also have a look at the test folder to see some examples of using the API.\n\nOther\n-----\nMade by Alex Scheel Meyer. Released to the public domain.\n\n","_id":"node-phantom@0.2.2","dist":{"shasum":"79068da29a1aab8b0d97b3a4b204bef272ea4244","tarball":"https://registry.npmjs.org/node-phantom/-/node-phantom-0.2.2.tgz","integrity":"sha512-OpcFnnRefjjMZeTVqtUwIr//PqPqQ5Nz5ruNmvL3gAivdlV6kxuCtATjMnxB7MmCF03VHqxIbsjHHRTZifV5HQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCn9VEV7ZoSDdoOl2saRLz3v3UpFAIcU8oLCNTmRncVRAIhAJjeAorz0wGaw7kRlaUfb7rf9uZjkMlqqw54+iMKIfN4"}]},"_npmVersion":"1.1.61","_npmUser":{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"},"maintainers":[{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"}]},"0.2.3":{"author":{"name":"Alex Scheel Meyer","url":"http://www.linkedin.com/in/alexscheelmeyer"},"name":"node-phantom","description":"bridge between node.js and PhantomJS","version":"0.2.3","homepage":"https://github.com/alexscheelmeyer/node-phantom","repository":{"type":"git","url":"git://github.com/alexscheelmeyer/node-phantom.git"},"main":"node-phantom.js","scripts":{"test":"expresso"},"dependencies":{"socket.io":">=0.9.6"},"devDependencies":{"socket.io":">=0.9.2"},"optionalDependencies":{},"engines":{"node":"*"},"readme":"Node-phantom\n---------------\n\nThis is a bridge between [PhantomJs](http://phantomjs.org/) and [Node.js](http://nodejs.org/).\n\nIt is very much similar to the other bridge available, [PhantomJS-Node](https://github.com/sgentle/phantomjs-node), but is different in a few ways:\n\n  - Way fewer dependencies/layers.\n  - API has the idiomatic error indicator as first parameter to callbacks.\n  - Uses plain Javascript instead of Coffeescript.\n\n\nRequirements\n------------\nYou will need to install PhantomJS first. The bridge assumes that the \"phantomjs\" binary is available in the PATH.\n\nThe only other dependency for using it is [socket.io](http://socket.io/).\n\nFor running the tests you will need [Expresso](http://visionmedia.github.com/expresso/). The tests require PhantomJS 1.6 or newer to pass.\n\n\nInstalling\n----------\n\n    npm install node-phantom\n\n\nUsage\n-----\nYou can use it pretty much like you would use PhantomJS-Node, for example this is an adaptation of a [web scraping example](http://net.tutsplus.com/tutorials/javascript-ajax/web-scraping-with-node-js/) :\n\n```javascript\nvar phantom=require('node-phantom');\nphantom.create(function(err,ph) {\n  return ph.createPage(function(err,page) {\n    return page.open(\"http://tilomitra.com/repository/screenscrape/ajax.html\", function(err,status) {\n      console.log(\"opened site? \", status);\n      page.includeJs('http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', function(err) {\n        //jQuery Loaded.\n        //Wait for a bit for AJAX content to load on the page. Here, we are waiting 5 seconds.\n        setTimeout(function() {\n          return page.evaluate(function() {\n            //Get what you want from the page using jQuery. A good way is to populate an object with all the jQuery commands that you need and then return the object.\n            var h2Arr = [],\n            pArr = [];\n            $('h2').each(function() {\n              h2Arr.push($(this).html());\n            });\n            $('p').each(function() {\n              pArr.push($(this).html());\n            });\n\n            return {\n              h2: h2Arr,\n              p: pArr\n            };\n          }, function(err,result) {\n            console.log(result);\n            ph.exit();\n          });\n        }, 5000);\n      });\n\t});\n  });\n});\n```\n\n### phantom.create(callback,options)\n\n`options` is an optional object with options for how to start PhantomJS.\n`options.parameters` is an array of parameters that will be passed to PhantomJS on the commandline.\nFor example\n\n```javascript\nphantom.create(callback,{parameters:{'ignore-ssl-errors':'yes'}})\n```\n\nwill start phantom as:\n\n```bash\nphantomjs --ignore-ssl-errors=yes\n```\n\nYou may also pass in a custom path if you need to select a specific instance of PhantomJS or it is not present in PATH environment.\nThis can for example be used together with the [PhantomJS package](https://npmjs.org/package/phantomjs) like so:\n\n```javascript\nphantom.create(callback,{phantomPath:require('phantomjs').path})\n```\n\nYou can also have a look at the test folder to see some examples of using the API.\n\nOther\n-----\nMade by Alex Scheel Meyer. Released to the public domain.\n\n","_id":"node-phantom@0.2.3","dist":{"shasum":"5c291d9374599647d8310708d1f0bd35c0cc62a1","tarball":"https://registry.npmjs.org/node-phantom/-/node-phantom-0.2.3.tgz","integrity":"sha512-pBYObo5/uXHLQYicOBGZg34THalgSFnRgJU+f950KyvP/F0BWhS/XQ29P9iWQpJN6NTYZcTzuZYYzIs4bF4UHw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGC+k/4hvwudW/YMM0KBT0xb1wPgPNEkFkeM5RZlObmEAiEAxbOUiIrSG4tjZJp+1hwWdBsDaxAyYCablQiXq2LouIk="}]},"_npmVersion":"1.1.61","_npmUser":{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"},"maintainers":[{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"}]},"0.2.4":{"author":{"name":"Alex Scheel Meyer","url":"http://www.linkedin.com/in/alexscheelmeyer"},"name":"node-phantom","description":"bridge between node.js and PhantomJS","version":"0.2.4","homepage":"https://github.com/alexscheelmeyer/node-phantom","repository":{"type":"git","url":"git://github.com/alexscheelmeyer/node-phantom.git"},"main":"node-phantom.js","scripts":{"test":"mocha"},"dependencies":{"socket.io":">=0.9.6"},"devDependencies":{"mocha":"*","pngjs":"0.4.0"},"optionalDependencies":{},"engines":{"node":"*"},"readme":"Node-phantom\n---------------\n\nThis is a bridge between [PhantomJs](http://phantomjs.org/) and [Node.js](http://nodejs.org/).\n\nIt is very much similar to the other bridge available, [PhantomJS-Node](https://github.com/sgentle/phantomjs-node), but is different in a few ways:\n\n  - Way fewer dependencies/layers.\n  - API has the idiomatic error indicator as first parameter to callbacks.\n  - Uses plain Javascript instead of Coffeescript.\n\n\nRequirements\n------------\nYou will need to install PhantomJS first. The bridge assumes that the \"phantomjs\" binary is available in the PATH.\n\nThe only other dependency for using it is [socket.io](http://socket.io/).\n\nFor running the tests you will need [Mocha](http://visionmedia.github.io/mocha/). The tests require PhantomJS 1.6 or newer to pass.\n\n\nInstalling\n----------\n\n    npm install node-phantom\n\n\nUsage\n-----\nYou can use it pretty much like you would use PhantomJS-Node, for example this is an adaptation of a [web scraping example](http://net.tutsplus.com/tutorials/javascript-ajax/web-scraping-with-node-js/) :\n\n```javascript\nvar phantom=require('node-phantom');\nphantom.create(function(err,ph) {\n  return ph.createPage(function(err,page) {\n    return page.open(\"http://tilomitra.com/repository/screenscrape/ajax.html\", function(err,status) {\n      console.log(\"opened site? \", status);\n      page.includeJs('http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', function(err) {\n        //jQuery Loaded.\n        //Wait for a bit for AJAX content to load on the page. Here, we are waiting 5 seconds.\n        setTimeout(function() {\n          return page.evaluate(function() {\n            //Get what you want from the page using jQuery. A good way is to populate an object with all the jQuery commands that you need and then return the object.\n            var h2Arr = [],\n            pArr = [];\n            $('h2').each(function() {\n              h2Arr.push($(this).html());\n            });\n            $('p').each(function() {\n              pArr.push($(this).html());\n            });\n\n            return {\n              h2: h2Arr,\n              p: pArr\n            };\n          }, function(err,result) {\n            console.log(result);\n            ph.exit();\n          });\n        }, 5000);\n      });\n\t});\n  });\n});\n```\n\n### phantom.create(callback,options)\n\n`options` is an optional object with options for how to start PhantomJS.\n`options.parameters` is an array of parameters that will be passed to PhantomJS on the commandline.\nFor example\n\n```javascript\nphantom.create(callback,{parameters:{'ignore-ssl-errors':'yes'}})\n```\n\nwill start phantom as:\n\n```bash\nphantomjs --ignore-ssl-errors=yes\n```\n\nYou may also pass in a custom path if you need to select a specific instance of PhantomJS or it is not present in PATH environment.\nThis can for example be used together with the [PhantomJS package](https://npmjs.org/package/phantomjs) like so:\n\n```javascript\nphantom.create(callback,{phantomPath:require('phantomjs').path})\n```\n\n### Working with the API\n\nOnce you have the phantom instance you can use it much as you would the real PhantomJS, node-phantom tries to mimic the api.\n\nAn exception is that since this is a wrapper that does network communication to control PhantomJS, _all_ methods are asynchronous and\nwith a callback even when the PhantomJS version is synchronous.\n\nAnother notable exception is the page.evaluate method (and page.evaluateAsync method) that since PhantomJS 1.6 has a provision for extra arguments\nto be passed into the evaluated function. In the node-phantom world these arguments are placed _after_ the callback. So the\norder is evaluatee, callback, optional arguments. In code it looks like :\n\n```javascript\npage.evaluate(function(s){\n\treturn document.querySelector(s).innerText;\n},function(err,title){\n\tconsole.log(title);\n},'title');\n```\n\n\nYou can also have a look at the test folder to see some examples of using the API.\n\nOther\n-----\nMade by Alex Scheel Meyer. Released to the public domain.\n\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/alexscheelmeyer/node-phantom/issues"},"_id":"node-phantom@0.2.4","dist":{"shasum":"64f885a41564107ecf05162b444676c7e110fe22","tarball":"https://registry.npmjs.org/node-phantom/-/node-phantom-0.2.4.tgz","integrity":"sha512-uPnX7smte0a9cgUhDGDyUjxT1271z99gnrgnluVht5vfMyHshpjZ8kMIZ0y7LcP/Ihxx723QgDvWeBqxG6kQWg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUHHBdTfqG83oW4192iy69J2gCHIYbULd5XWX8hXkMRQIgTDH3viczP7vxEmMJhW7QD/XiOPkGpV7rANYMQ74EdP8="}]},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"},"maintainers":[{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"}]},"0.2.5":{"author":{"name":"Alex Scheel Meyer","url":"http://www.linkedin.com/in/alexscheelmeyer"},"name":"node-phantom","description":"bridge between node.js and PhantomJS","version":"0.2.5","homepage":"https://github.com/alexscheelmeyer/node-phantom","repository":{"type":"git","url":"git://github.com/alexscheelmeyer/node-phantom.git"},"main":"node-phantom.js","scripts":{"test":"mocha"},"dependencies":{"socket.io":">=0.9.6"},"devDependencies":{"mocha":"*","pngjs":"0.4.0"},"optionalDependencies":{},"engines":{"node":"*"},"readme":"Node-phantom\n---------------\n\nThis is a bridge between [PhantomJs](http://phantomjs.org/) and [Node.js](http://nodejs.org/).\n\nIt is very much similar to the other bridge available, [PhantomJS-Node](https://github.com/sgentle/phantomjs-node), but is different in a few ways:\n\n  - Way fewer dependencies/layers.\n  - API has the idiomatic error indicator as first parameter to callbacks.\n  - Uses plain Javascript instead of Coffeescript.\n\n\nRequirements\n------------\nYou will need to install PhantomJS first. The bridge assumes that the \"phantomjs\" binary is available in the PATH.\n\nThe only other dependency for using it is [socket.io](http://socket.io/).\n\nFor running the tests you will need [Mocha](http://visionmedia.github.io/mocha/). The tests require PhantomJS 1.6 or newer to pass.\n\n\nInstalling\n----------\n\n    npm install node-phantom\n\n\nUsage\n-----\nYou can use it pretty much like you would use PhantomJS-Node, for example this is an adaptation of a [web scraping example](http://net.tutsplus.com/tutorials/javascript-ajax/web-scraping-with-node-js/) :\n\n```javascript\nvar phantom=require('node-phantom');\nphantom.create(function(err,ph) {\n  return ph.createPage(function(err,page) {\n    return page.open(\"http://tilomitra.com/repository/screenscrape/ajax.html\", function(err,status) {\n      console.log(\"opened site? \", status);\n      page.includeJs('http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', function(err) {\n        //jQuery Loaded.\n        //Wait for a bit for AJAX content to load on the page. Here, we are waiting 5 seconds.\n        setTimeout(function() {\n          return page.evaluate(function() {\n            //Get what you want from the page using jQuery. A good way is to populate an object with all the jQuery commands that you need and then return the object.\n            var h2Arr = [],\n            pArr = [];\n            $('h2').each(function() {\n              h2Arr.push($(this).html());\n            });\n            $('p').each(function() {\n              pArr.push($(this).html());\n            });\n\n            return {\n              h2: h2Arr,\n              p: pArr\n            };\n          }, function(err,result) {\n            console.log(result);\n            ph.exit();\n          });\n        }, 5000);\n      });\n\t});\n  });\n});\n```\n\n### phantom.create(callback,options)\n\n`options` is an optional object with options for how to start PhantomJS.\n`options.parameters` is an array of parameters that will be passed to PhantomJS on the commandline.\nFor example\n\n```javascript\nphantom.create(callback,{parameters:{'ignore-ssl-errors':'yes'}})\n```\n\nwill start phantom as:\n\n```bash\nphantomjs --ignore-ssl-errors=yes\n```\n\nYou may also pass in a custom path if you need to select a specific instance of PhantomJS or it is not present in PATH environment.\nThis can for example be used together with the [PhantomJS package](https://npmjs.org/package/phantomjs) like so:\n\n```javascript\nphantom.create(callback,{phantomPath:require('phantomjs').path})\n```\n\n### Working with the API\n\nOnce you have the phantom instance you can use it much as you would the real PhantomJS, node-phantom tries to mimic the api.\n\nAn exception is that since this is a wrapper that does network communication to control PhantomJS, _all_ methods are asynchronous and\nwith a callback even when the PhantomJS version is synchronous.\n\nAnother notable exception is the page.evaluate method (and page.evaluateAsync method) that since PhantomJS 1.6 has a provision for extra arguments\nto be passed into the evaluated function. In the node-phantom world these arguments are placed _after_ the callback. So the\norder is evaluatee, callback, optional arguments. In code it looks like :\n\n```javascript\npage.evaluate(function(s){\n\treturn document.querySelector(s).innerText;\n},function(err,title){\n\tconsole.log(title);\n},'title');\n```\n\n\nYou can also have a look at the test folder to see some examples of using the API.\n\nOther\n-----\nMade by Alex Scheel Meyer. Released to the public domain.\n\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/alexscheelmeyer/node-phantom/issues"},"_id":"node-phantom@0.2.5","dist":{"shasum":"e330c3c4f6e7564aeec838a61afb0bd70e9c17ab","tarball":"https://registry.npmjs.org/node-phantom/-/node-phantom-0.2.5.tgz","integrity":"sha512-Kg229G3NeweBQWdVcyATUxwvklsCVvbs7d+F01pxacP220k7qji33mTqYdoa7W88V1/Nt0oJbJ0J5WJyPy5X0g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH2Yn//yym6UyU4EwVg2ladtjpiQ4LUU+FMiV0X85zdKAiEA/+v6zHccpv458r/iQXeYL3JMNTGfbY740e0t5tp73UI="}]},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"},"maintainers":[{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"}]}},"readme":"Node-phantom\n---------------\n\nThis is a bridge between [PhantomJs](http://phantomjs.org/) and [Node.js](http://nodejs.org/).\n\nIt is very much similar to the other bridge available, [PhantomJS-Node](https://github.com/sgentle/phantomjs-node), but is different in a few ways:\n\n  - Way fewer dependencies.\n  - API has the idiomatic error indicator as first parameter to callbacks.\n  - Uses plain Javascript instead of Coffeescript.\n\n\nRequirements\n------------\nYou will need to install PhantomJS first. The bridge assumes that the \"phantomjs\" binary is available in the PATH.\n\nThe only other dependency for using it is [socket.io](http://socket.io/).\n\nFor running the tests you will need [Expresso](http://visionmedia.github.com/expresso/).\n\n\nInstalling\n----------\nFor now you will need to manually install socket.io and node-phantom. Npm package to be arriving shortly.\n\n\nUsage\n-----\nYou can use it pretty much like you would use PhantomJS-Node, for example this is an adaptation of a [web scraping example](http://net.tutsplus.com/tutorials/javascript-ajax/web-scraping-with-node-js/) :\n\n```javascript\nvar phantom=require('node-phantom');\nphantom.create(function(err,ph) {\n  return ph.createPage(function(err,page) {\n    return page.open(\"http://tilomitra.com/repository/screenscrape/ajax.html\", function(err,status) {\n      console.log(\"opened site? \", status);\n      page.injectJs('http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', function(err) {\n        //jQuery Loaded.\n        //Wait for a bit for AJAX content to load on the page. Here, we are waiting 5 seconds.\n        setTimeout(function() {\n          return page.evaluate(function() {\n            //Get what you want from the page using jQuery. A good way is to populate an object with all the jQuery commands that you need and then return the object.\n            var h2Arr = [],\n            pArr = [];\n            $('h2').each(function() {\n              h2Arr.push($(this).html());\n            });\n            $('p').each(function() {\n              pArr.push($(this).html());\n            });\n\n            return {\n              h2: h2Arr,\n              p: pArr\n            };\n          }, function(err,result) {\n            console.log(result);\n            ph.exit();\n          });\n        }, 5000);\n      });\n\t});\n  });\n});\n```\n\nYou can also have a look at the test folder to see some examples of using the API.\n\nOther\n-----\nMade by Alex Scheel Meyer. Released to the public domain.\n\n","maintainers":[{"name":"alexscheelmeyer","email":"alexscheelmeyer@gmail.com"}],"time":{"modified":"2022-06-21T18:00:31.164Z","created":"2012-07-06T22:39:30.003Z","0.1.0":"2012-07-06T22:39:32.084Z","0.1.1":"2012-08-20T09:35:04.795Z","0.1.2":"2012-09-07T09:50:49.079Z","0.2.0":"2013-01-11T10:36:54.653Z","0.2.1":"2013-02-01T11:08:22.465Z","0.2.2":"2013-05-22T08:53:41.716Z","0.2.3":"2013-05-22T09:26:43.058Z","0.2.4":"2013-10-15T19:56:00.801Z","0.2.5":"2013-10-18T19:25:22.841Z"},"author":{"name":"Alex Scheel Meyer","url":"http://www.linkedin.com/in/alexscheelmeyer"},"repository":{"type":"git","url":"git://github.com/alexscheelmeyer/node-phantom.git"},"users":{"eslivinski":true,"rajkumarbe":true,"abouleinein":true,"vb078":true,"alien":true,"andr":true,"azevedo":true,"hack21":true}}