plant.js

0.0.0 • Public • Published

plant.js

var Plant = require('plant.js');

var browser = new Plant(); // <- You can pass defaults for request. 
browser.get('http://www.theuselessweb.com/')

.then(function($) {
  console.log($('h3').text()); // USELESS
  return browser.follow('a:nth-child(2)'); // <- Follows link with this selector
})

.then(function($) {
  console.log($('.text-holster h1').text()); // SHUT UP& LOOK
  return browser.get('http://www.theuselessweb.com/');
})

.then(function($) {
  console.log($('h3').text()); // USELESS
})

.catch(function(e) {
  return console.trace(e);
});

Package Sidebar

Install

npm i plant.js

Weekly Downloads

0

Version

0.0.0

License

MIT

Last publish

Collaborators

  • mrkev