I am making a proxy scraper program and i need to find the proxies in an array
Here is an example of what i want to get out of this line:
document.write('77.237.138.51')
I want to remove document.write('" and "') so it only shows the proxy
Here is my current code:
client.DownloadFile("http://www.gatherproxy.com/sockslist", "source.txt");
string [] lines = File.ReadAllLines("source.txt");
string start = "document.write('";
string end = "')";
Now how would I make it so where i can delete start and end and return the middle element (the proxy)
In reply to Domysee
using (WebClient client = new WebClient())
client.DownloadFile("http://www.gatherproxy.com/sockslist", "source.txt");
string[] lines = File.ReadAllLines("source.txt");
for (int i = 0; i < 1000; i++)
{
string[] ipAddresses = lines.Select(l => Regex.Match(l, @"(\d+\.){3}\d+").Value).ToArray();
i++;
string[] port = lines.Select(l => Regex.Match(l, @"(\d+\.){3}\d+").Value).ToArray();
Console.WriteLine(ipAddresses + ":" + port);
}
Console.ReadLine();
document.write('&')?