Skip to content

Instantly share code, notes, and snippets.

@saasindustries
Created January 12, 2021 16:23
Show Gist options
  • Save saasindustries/ce3e165048a59d40fbe213cdccb30d88 to your computer and use it in GitHub Desktop.
Save saasindustries/ce3e165048a59d40fbe213cdccb30d88 to your computer and use it in GitHub Desktop.
let ip_addresses = [];
let port_numbers = [];
request("https://sslproxies.org/", function(error, response, html) {
if (!error && response.statusCode == 200) {
const $ = cheerio.load(html);
$("td:nth-child(1)").each(function(index, value) {
ip_addresses[index] = $(this).text();
});
$("td:nth-child(2)").each(function(index, value) {
port_numbers[index] = $(this).text();
});
} else {
console.log("Error loading proxy, please try again");
}
ip_addresses.join(", ");
port_numbers.join(", ");
console.log("IP Addresses:", ip_addresses);
console.log("Port Numbers:", port_numbers);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment