1///2/// WebClient取网页源码 3///4///5///单位(秒)6///7///http状态码8///9publicstaticstring GetHtmlSource(string url,int timout,string proxy,outint httpCode) 10 { 11try12 {14using (var client =new ExtendedWebClient()) 15 { 16 client.Timeout = timout *1000; 17 client.Proxy = proxy; 18 client.Encoding = Encoding.UTF8; 19string str = client.DownloadString(url); 2021//验证字符是否有乱码22if (IsLuan(str)) 23 { 24 Regex reg =new Regex("