Skip to content

Instantly share code, notes, and snippets.

@ryanhugh
Created September 4, 2017 23:59
Show Gist options
  • Save ryanhugh/85856e2d25afa250883beda347f36c7d to your computer and use it in GitHub Desktop.
Save ryanhugh/85856e2d25afa250883beda347f36c7d to your computer and use it in GitHub Desktop.
for (var i = 0; i < words.length; i++) {
var link = 'https://en.wikipedia.org/wiki/' + words[i];
request(link, function(response, html) {
console.log(html.body.length) // Note that this has differnt lengths which means the pages are different
var $ = cheerio.load(html);
var data = $(this);
console.log(link, i);
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment