- <img alt="奋斗" src="http://static.blog.youkuaiyun.com/xheditor/xheditor_emot/default/struggle.gif">
- HttpWebRequest获取页面数据
- HttpWebRequest req = (HttpWebRequest)WebRequest.Create("");
- req.Method = "GET";
- HttpWebResponse myResponse= (HttpWebResponse)req.GetResponse();
- StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.Default);
- string content = reader.ReadToEnd();
- reader.Close();
- 再用正则解析
ASP.NET后台获取网页内容
最新推荐文章于 2016-04-08 17:59:28 发布