0
我写了这个代码在VBA webscraping:通过类名称组合两个元素具有相同的子字符串?
Sub Scrape()
Dim Document As HTMLDocument
Dim Browser As InternetExplorer
Set Browser = New InternetExplorer
Do While Browser.Busy And Not Browser.readyState = READYSTATE_COMPLETE
DoEvents
Loop
Set Document = Browser.Document
Set Elements1 = Document.getElementsByClassName("Prices-red")
Set Elements2 = Document.getElementsByClassName("Prices-white")
End Sub
我想在一个元素命名的元素这两个元素只搜索“价格”相结合。
这可能吗?就像我们在Access Prices *
中进行查询一样。
向我们展示它在网络中的一些数据以及您打算如何获取数据。由于getElementByClassName只会获取每个特定类的信息。 – PaulFrancis