Created
January 27, 2020 14:16
-
-
Save Hyllesen/20389ad1981872429ec409375598f401 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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