想要爬取网页源代码的 value="47174"的数字部分填入表格的单元格中,但是现代码只得到员工名字,无法爬取value的部分,该怎么修改代码好。
Sub 网页提取数据()
On Error Resume Next
Dim m
m = 1
With CreateObject("internetexplorer.application")
.Visible = True
.Navigate "https://www2.daikokudrug.com/timecard/shift/create1week/?shift-week=2019-31&shop-code=32"
Do Until .ReadyState = 4
DoEvents
Loop
Set r = .document.All.tags("li")
For i = 0 To r.Length - 1
t = r(i).classname
If r(i).classname = "code" Then
Cells(m, 1) = r(i).innerText
m = m + 1
End If
Next
End With
End Sub