首页 > 代码库 > Winfrom 抓取web页面内容代码

Winfrom 抓取web页面内容代码

            WebRequest request = WebRequest.Create("http://1.bjapp.sinaapp.com/play.php?a=" + PageUrl);            WebResponse response = request.GetResponse();            Stream resStream = response.GetResponseStream();            StreamReader sr = new StreamReader(resStream, System.Text.Encoding.UTF8);            string htmlinfo = sr.ReadToEnd();            resStream.Close();            sr.Close();

Winfrom 抓取web页面内容代码