别人给我一个网页的url,说让我提取数行数据,这些数据都是有脚本生成的 ,大家给我说说思路,有例子更好 。谢谢 

解决方案 »

  1.   

    webclient,webbrower抓取数据
    js,ajax生成的很难抓取
      

  2.   

      ' 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
      

  3.   

    获取到了HTML就可以用正则提取了
      

  4.   

    谢谢 楼上   webclient只能获取静态的文本,动态的获取不了   大家帮忙想想吧 
      

  5.   

    楼主把对方的页面另存为 或用HttpWatch分析 可以得到你要的数据吗?如果得不到估计很难搞.
      

  6.   

    如果是ajax那比较好,你只要用抓包工具,得到对方ajax请求的url,
    然后你模拟请求那个url,在进行处理.