Skip to content

Instantly share code, notes, and snippets.

@ryanhugh
Created September 4, 2017 23:56
Show Gist options
  • Save ryanhugh/c40f16a7a71249a242c2e86c8626674d to your computer and use it in GitHub Desktop.
Save ryanhugh/c40f16a7a71249a242c2e86c8626674d to your computer and use it in GitHub Desktop.
var words = ['Hamburger', 'Wine', 'Cheese'];
var link = 'https://en.wikipedia.org/wiki/';
words.forEach(function(word) {
var link = 'https://en.wikipedia.org/wiki/' + word;
request(link, function(response, html) {
var $ = cheerio.load(html);
var data = $(this);
console.log(link);
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment