Skip to content

Instantly share code, notes, and snippets.

@saasindustries
Last active January 14, 2021 14:41
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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