Advertisement
Guest User

Untitled

a guest
Mar 24th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. ArrayList URLs = new ArrayList();
  2. ArrayList Duplicated = new ArrayList();
  3. byte[] data = wc.DownloadData("https://www.bing.com/search?q=" + keyword);
  4. MatchCollection M = Regex.Matches(Encoding.UTF8.GetString(data, 0, data.Length), "[a-z]+[:][/][/][a-z]+[.][a-zA-Z0-9]+[.][a-z]+");
  5. foreach (Match m in M)
  6. Duplicated.Add(m.Value);
  7. foreach (string line in Duplicated)
  8. URLs.Add(line);
  9. for (int i = 0; i < Duplicated.Count; i++)
  10. {
  11. if (URLs.Contains(Duplicated[i]))
  12. URLs.Remove(Duplicated[i]);
  13. }
  14. foreach (string line in URLs)
  15. richTextBox1.AppendText(line + "rn");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement