' Initialize the WebRequest. Dim myRequest As WebRequest = WebRequest.Create("http://www.163.com") ' Return the response. Dim myResponse As WebResponse = myRequest.GetResponse() ' Code to use the WebResponse goes here. ' Close the response to free resources. Dim resStream As Stream = myResponse.GetResponseStream() Dim sr As New StreamReader(resStream, Encoding.UTF8) Dim str1 As String = sr.ReadToEnd() myResponse.Close() TextBox1.Text = str1
js,ajax生成的很难抓取
Dim myRequest As WebRequest = WebRequest.Create("http://www.163.com") ' Return the response.
Dim myResponse As WebResponse = myRequest.GetResponse() ' Code to use the WebResponse goes here.
' Close the response to free resources. Dim resStream As Stream = myResponse.GetResponseStream()
Dim sr As New StreamReader(resStream, Encoding.UTF8) Dim str1 As String = sr.ReadToEnd() myResponse.Close() TextBox1.Text = str1
然后你模拟请求那个url,在进行处理.