Tag: scraping getelementbyid

如何在刮取时检查getelementById中的部分string匹配

我需要得到这个ID的价值:“价格含税9926” <span class="price-including-tax"> <span class="label">Incl. Tax:</span> <span class="price" id="price-including-tax-9926"> £70.21 </span> </span> 这是网站 这是我迄今为止所尝试的: Sub GetPriceData() Dim IE As New InternetExplorer Dim doc As HTMLDocument Dim wk As Worksheet, frow As Long, urL As String, i As Long Set wk = Sheet1 frow = wk.Range("B" & Rows.Count).End(xlUp).Row For i = 2 To frow urL = […]