HideMyAss Proxy Grabber


/ Published in: C#
Save to your folder(s)

A small snippet to parse out proxies from http://hidemyass.com/proxy-list/


Copy this code and paste it in your HTML
  1. public static string[] grabProxy(string source)
  2. {
  3. // Credits: Soft2050
  4. var proxies = new List<string>();
  5. foreach (Match m in Regex.Matches(source, @"<td><span>([\s\S]*?)(\d+)</td>"))
  6. {
  7. string port = m.Groups[2].Value;
  8. string ip = m.Groups[1].Value;
  9. ip = Regex.Replace(ip, @"(<(div|span) style=""display:none"">\d+.*?>|<.*?>)", "").Trim();
  10. proxies.Add(string.Concat(ip, ":", port));
  11. }
  12. return proxies.ToArray();
  13. }

URL: http://soft2050.in

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.