[.NET] 如何解析HTML碼?
目前有擷取到網頁的原始碼,但要如何擷取我要的資訊呢?
Dim web As New System.Net.WebClient()
web.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
Dim d As Byte() =
System.Text.Encoding.GetEncoding("Big5").GetBytes("syear=20100908")
Dim res As Byte() =
web.UploadData("http://www.tai.asp", "POST", d)
MsgBox(System.Text.Encoding.GetEncoding("Big5").GetString(res))
res為擷取到的網頁原始碼
那我假設要網頁原始檔裡面<TD align=right class="12bk">8817</TD>的8817
不知道接下來還要怎樣處理呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 219.71.218.129
推
01/02 00:30, , 1F
01/02 00:30, 1F
→
01/02 07:49, , 2F
01/02 07:49, 2F
→
01/02 08:20, , 3F
01/02 08:20, 3F
→
01/02 08:21, , 4F
01/02 08:21, 4F
推
01/02 12:27, , 5F
01/02 12:27, 5F