我通过httpwebrequest 访问这个网址 https://toefl.etest.net.cn/cn/ 原来都是可以读取到网站网页源码,包括汉字等,现在不知道网页添加了什么代码,还是做了什么处理,读取不到网页的源码,只读取到源码中的 JavaScript 那部分。具体如下
Dim URL As String = "http://toefl.etest.net.cn/cn/"
Dim webRequest1 As HttpWebRequest = Net.WebRequest.Create(URL)
Dim respHTMLG As String = ""
webRequest1 = Net.WebRequest.Create(New Uri(URL))
webRequest1.Method = "GET"
webRequest1.KeepAlive = true
webRequest1.CookieContainer = ccPool
Dim response As HttpWebResponse = webRequest1.GetResponse()
Dim srInfo As New StreamReader(response.GetResponseStream(), Encoding.Default)
respHTMLG = srInfo.ReadToEnd()
srInfo.Close()
RichTextBox1.Text = respHTMLG
访问这个网页的话就可以读取到内容,不知这两个网页有什么区别 "http://toefl.etest.net.cn/" 为何读取不到
http://toefl.etest.net.cn/cn/ 的完整内容
紧急求助,万分感谢
上述方式只获取到以下源码,一个汉字也没有,网页下面的那部分似乎就没有读取到