The error point is For each node as htmlnode ...
Error: Additional information: Object reference not set to an instance of an object.
Dim webClient As New System.Net.WebClient
Dim WebSource As String = webClient.DownloadString("http://boc.quotepower.com/web/bochk/stocks_mktTransactions.jsp?lang=en&stock=811&lotsize=100&searchType=2&turnover=500000&rangeType=1&begin_hour=9&begin_min=30&end_hour=16&end_min=0&lang=zh_TW&domain=BOCHK&rand=-1076862387&lastLevel1Name=nav_stocks&lastStock=00005&x=0&y=0") '
txtPageHTML.Text = WebSource
Dim links As New List(Of String)()
Dim htmlDoc As New HtmlAgilityPack.HtmlDocument()
htmlDoc.LoadHtml(WebSource)
'/html/body/table[4]/tbody/tr/td/table/tbody/tr/td/table[2]/tbody
'/html/body/table[4]/tbody/tr/td/table/tbody/tr/td/table[2]/tbody/tr[2]
For Each node As HtmlNode In htmlDoc.DocumentNode.SelectNodes("/html/body/table[4]/tbody/tr/td/table/tbody/tr/td/table[2]/tbody/tr[2]")
txtPageHTML = node.InnerText
Next
The expected results to be got:
Time Price Volume Turnover No. of Lots Above/Below Market Price
15:19:40 7.0 75K 525K 75
15:01:54 7.05 83K 585.15K 83
15:01:33 7.04 116K 816.64K 116