web-phantom
v0.0.6
Published
Simple bridge between Node.js and PhantomJS
Downloads
8
Readme
npm install web-phantom
const rWebPhantom = require("web-phantom"),
rCo = require("co");
rCo(function* () {
const ph = yield rWebPhantom();
const page = yield ph.createPage();
const status = yield page.open("https://db.gg"),
content = yield page.content();
console.log("Page (%s):\n\n%s", status, content);
yield page.close();
yield ph.exit();
}).catch(console.error);
- Download PhantomJS (2.x)
- Run PhantomJS in the console: "> phantomjs -v"
- Run node.js applications
Doc
License
MIT