Created
January 12, 2021 16:26
-
-
Save saasindustries/86f56100929413da471ce8dc350fe643 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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