抓取excel中的微数据属性

我想抓取来自网站的itemprop微数据,并将其放入excel工作表的单元格中。

<li>Item Num: <span itemprop="productID">123ABC-200</span> </li> <li>ManufacturerNum: <span itemprop="model">ABC123</span> </li> 

我存储的地址刮在一个专栏,我试图打开IE浏览器,导航到网站,抓住数据,并把它扔到另一个单元格。

 Sub scrape() Dim i As Integer lastrow = Sheet1.Cells(Rows.Count, "A").End(xlUp).Row For i = 2 To lastrow Set wb = CreateObject("internetExplorer.Application") sURL = Cells(i, 1) wb.navigate sURL wb.Visible = True While wb.Busy DoEvents Wend 'HTML document Set doc = wb.document Cells(i, 2) = doc.Title On Error GoTo err_clear Dim el As Object elem = doc.GetElementsByTagName("span") atts = elem.getAttribute("itemprop") For Each el In atts Cells(i, 3).Value = Cells(i, 3).Value & ", " & el.innerText Next el err_clear: If Err <> 0 Then Err.Clear Resume Next End If wb.Quit Range(Cells(i, 1), Cells(i, 3)).Columns.AutoFit Next i End Sub 

我什么都没回来 如果我只是search跨度,我可以把他们全部。我没有成功拉任何HTML元素的任何属性。