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