Last active
January 14, 2021 14:41
-
-
Save saasindustries/ffa9011844eba639c4ec456c37a262fd 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 axios = require('axios'); | |
const cheerio = require('cheerio'); | |
//performing a GET request | |
axios.get('https://www.forextradingbig.com/instaforex-broker-review/') | |
.then(response => { | |
//handling the success | |
const html = response.data; | |
//loading response data into a Cheerio instance | |
const $ = cheerio.load(html); | |
//selecting the elements with the data | |
const scrapedata = $('a', '.comment-bubble').text(); | |
//outputting the scraped data | |
console.log(scrapedata); | |
}) | |
.catch( error => { | |
console.log(error); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment