Skip to content

Instantly share code, notes, and snippets.

@Hyllesen
Created January 27, 2020 14:16
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 Hyllesen/20389ad1981872429ec409375598f401 to your computer and use it in GitHub Desktop.
Save Hyllesen/20389ad1981872429ec409375598f401 to your computer and use it in GitHub Desktop.
const request = require("request-promise");
const cheerio = require("cheerio");
async function main() {
const result = await request.get("http://codingwithstefan.com/table-example");
const $ = cheerio.load(result);
$("body > table > tbody > tr").each((index, element) => {
console.log($(element).find("td")[0]);
});
}
main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment