Skip to content

Daeren/web-phantom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
  1. Download PhantomJS (2.x)
  2. Run PhantomJS in the console: "> phantomjs -v"
  3. Run node.js applications

Doc

License

MIT


@ Daeren @ Telegram

About

Simple bridge between Node.js and PhantomJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published