Skip to content

Instantly share code, notes, and snippets.

@AndrewHuffman
Created May 21, 2017 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrewHuffman/8e6cecdc741d0a8d5e5b7b582cfa1f2e to your computer and use it in GitHub Desktop.
Save AndrewHuffman/8e6cecdc741d0a8d5e5b7b582cfa1f2e to your computer and use it in GitHub Desktop.
#!/usr/bin/env node
var html = require('fs').readFileSync(require('path').join(__dirname, 'index.html'))
require("node-jsdom").env('http://instantwatcher.com/', ["http://code.jquery.com/jquery.js"],
function (errors, window) {
console.log("contents of a.the-link:", window.$("li").text().split(' ').join('\n'))
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment