后台代码如下:
string url = "http://baoliao.cq.qq.com/pc/detail.html?id=443758s";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Accept = "*/*"; //接受任意文件
request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)"; //
request.AllowAutoRedirect = true;//是否允许302
request.Referer = url; //当前页面的引用
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream stream = response.GetResponseStream();
StreamReader reader = new StreamReader(stream, Encoding.GetEncoding("utf-8"));
html = reader.ReadToEnd();
stream.Close();
text.Text = html;
如题,asp.net 抓取页面内容,如http://baoliao.cq.qq.com/pc/detail.html?id=443758这个网站的内容,其他页面的抓取都没问题,这个网站好像有点特殊,他只能抓取到页面的源代码,但不能抓取到整个HTML,各位大神也可以打开这网站的源码,也找不到内容主体。但HTML有内容主体,求解,怎么抓取到内容主体。