/ Published in: C#
A small snippet to parse out proxies from http://hidemyass.com/proxy-list/
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public static string[] grabProxy(string source) { // Credits: Soft2050 foreach (Match m in Regex.Matches(source, @"<td><span>([\s\S]*?)(\d+)</td>")) { string port = m.Groups[2].Value; string ip = m.Groups[1].Value; ip = Regex.Replace(ip, @"(<(div|span) style=""display:none"">\d+.*?>|<.*?>)", "").Trim(); proxies.Add(string.Concat(ip, ":", port)); } return proxies.ToArray(); }
URL: http://soft2050.in