Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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