Dim p() As String = "第九列,大单_流入,大单_流出,第九列,中单_流入,中单_流出,第九列,小单_流入,小单_流出".split(",") Dim web As new System.Windows.Forms.WebBrowser For Each rw As Row In Tables("表A").Rows web.Navigate("http://stockpage.10jqka.com.cn/" & rw("证券代码") & "/") Do Until web.ReadyState = 4 Application.DoEvents Loop For Each div As object In web.Document.GetElementsByTagName("div") If div.GetAttribute("ClassName") = "sub_cont_5 m_s_l hSty1" Dim n As Integer = 0 Dim dr As Row = Tables("表B").AddNew() dr("证券代码") = rw("证券代码") For Each td As object In div.GetElementsByTagName("td") dr(p(n)) = td.InnerText n=n+1 Next End If Next Next
|