Skip to content

Instantly share code, notes, and snippets.

@saasindustries
Created January 12, 2021 16:26
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saasindustries/86f56100929413da471ce8dc350fe643 to your computer and use it in GitHub Desktop.
Save saasindustries/86f56100929413da471ce8dc350fe643 to your computer and use it in GitHub Desktop.
const options = {
url: "https://www.forextradingbig.com/10-facts-you-must-know-on-online-forex-trading/",
method: "GET",
proxy: proxyGenerator()
};
request(options, function(error, response, html) {
if (!error && response.statusCode == 200) {
const $ = cheerio.load(html);
let article_headings = $("h2").text();
console.log(article_headings);
} else {
console.log("Error scraping site, please try again");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment