Revision: 58301
Updated Code
at July 6, 2012 18:19 by icinNet
Updated Code
public static string[] grabProxy(string source) { // Credits: Soft2050 var proxies = new List<string>(); 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(); }
Revision: 58300
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at July 6, 2012 18:14 by icinNet
Initial Code
public static string[] grabProxy(string source) { // Credits: Soft2050 var proxies = new List<string>(); 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(); }
Initial URL
http://soft2050.in
Initial Description
A small snippet to parse out proxies from http://hidemyass.com/proxy-list/
Initial Title
HideMyAss Proxy Grabber
Initial Tags
ip, c#
Initial Language
C#