标签:
string strUrl = txtUrl.Text.Trim() + "?pn=";
int iPageSize = Convert.ToInt32(txtPageSize.Text.Trim());
WebClient wc = new WebClient();
StringBuilder sb = new StringBuilder();
string html = "";
wc.Encoding = Encoding.Default;
for (int i = 1; i <= iPageSize; i++)
{
strUrl += i;
html = wc.DownloadString(strUrl);
MatchCollection mc = Regex.Matches(html, @"[1-9]\d{4,11}@(qq|QQ).com");
foreach (Match m in mc)
{
sb.AppendLine(m.Value + ";");
}
}
File.AppendAllText(@"h:\1.txt", sb.ToString(), Encoding.Default);
标签:
原文地址:http://www.cnblogs.com/kallynan/p/4772867.html